Using search_issues()

I am using jira-python 0.16 and am having fits trying to get search_issues() to work for me.

The following function is defined:

def findIssues(jiraInst, queryJQL):
    """ Return a list of issues that match the provided jql filter

        :param jiraInst - jira client object
        :param queryJQL - JQL filter string
    """
    if debug:
        print >>sys.stderr, '*fi:JQL = \'%s\'' % queryJQL
    try:
        # Try to get all issues that match the filter
        results = jiraInst.search_issues(jql_str=queryJQL, maxResults=200)
    except (JIRAError, ValueError) as err:
        print >>sys.stderr, '* Search for \"%s\" returned an error \"%s\"\n' % \
            (queryJQL, err)
        return []
    return results

If called like

results = findIssues(jira, r'project = "A Project" AND status = "Pending User"')

The following error is returned:

Search for "project = "A Project" AND status = "Pending User"" returned an error "HTTP 400: "The value 'A Project' does not exist for the field 'project'"

However, if I use 'project = "A Project" AND status = "Pending User"' as a search filter in the web interface all is right with the world and issues are returned.

Searching for 'status = "Pending User"' returns issues across all projects as expected using either the function or the web interface.

Any suggestions or help would be appreciated.

1 answer

1 accepted

This widget could not be displayed.

Pilot error. No permissions for the user I was connebeting to JIRA as.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

112 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you