From 34d99341e463cbdedd2ed12493c885c3ec771eec Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Mon, 2 Mar 2015 17:18:56 -0800 Subject: [PATCH] Alter default JIRA query to handle situations in which instances do not use the column names we are expecting. --- bugwarrior/docs/services/jira.rst | 11 +++++++---- bugwarrior/services/jira.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bugwarrior/docs/services/jira.rst b/bugwarrior/docs/services/jira.rst index 8aa3b52a5..c2430bbaf 100644 --- a/bugwarrior/docs/services/jira.rst +++ b/bugwarrior/docs/services/jira.rst @@ -37,10 +37,13 @@ Service Features Specify the Query to Use for Gathering Issues +++++++++++++++++++++++++++++++++++++++++++++ -You can specify the query used for gathering issues by using the -``jira.query`` parameter. For example, to select issues assigned to -'ralph' having a status that is not 'closed' and is not 'resolved', you -could add the following configuration option:: +By default, the JIRA plugin will include any issues that are assigned to you +but do not yet have a resolution set, but you can fine-tune the query used +for gather issues by setting the ``jira.query`` parameter. + +For example, to select issues assigned to 'ralph' having a status that is +not 'closed' and is not 'resolved', you could add the following +configuration option:: jira.query = assignee = ralph and status != closed and status != resolved diff --git a/bugwarrior/services/jira.py b/bugwarrior/services/jira.py index 3613f3c22..35e1ef27f 100644 --- a/bugwarrior/services/jira.py +++ b/bugwarrior/services/jira.py @@ -126,7 +126,7 @@ def __init__(self, *args, **kw): ) default_query = 'assignee=' + self.username + \ - ' AND status != closed and status != resolved' + ' AND resolution is null' self.query = self.config_get_default('query', default_query) self.jira = JIRA( options={