Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

search_issues not working

OLIVER CAPALAD May 22, 2019

Hi,

We recently upgraded to Jira 7.13.2 and it seems the search_issues in python no longer works. It is just returning null values.

2 answers

0 votes
Petr Vaníček
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2019

Hi,

you need to escape characters inside of your JQL string like single quotes.

https://linuxconfig.org/list-of-python-escape-sequence-characters-with-examples

OLIVER CAPALAD May 22, 2019

The escape character is not the issue. even if it is a different jql it still show null values.

I tried the below codes:

from jira import JIRA

options = {'server':'hostname',
'verify':False}

jira = JIRA(options, basic_auth=('user', 'user'))

issue = jira.issue("INC-120440")
issues = jira.search_issues('resolved is empty',maxResults=3)
print("RESULTS>>>>")
print(issue.key)
for i in issues:
  print("ticket")
  print(i.fields.summary)

 

Result:

RESULTS>>>>
INC-120440 

 

The result for issue = jira.issue("INC-120440") yields results but using the search_issues it yields blank value.

0 votes
QA_RohitSingh May 22, 2019

Project = “project name” AND status = open  AND assignee = currentuser() 

Try this on search bar with Actual project name

OLIVER CAPALAD May 22, 2019

Hi Rohit,

 

Thanks. I've tried but it still does not work.

 

Im running the below codes

query = jira.search_issues(jql_str="Project = 'Incident Management' AND status = open")   

for i in query:       

   print(i.id)

 

It just throw the below error:

{"errorMessages":["Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Management”'. (line 1, character 21)"],"errors":{}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events