JQL using JIRA API in Python

Harshita G April 10, 2023

Hi I am trying write a JQL using the API in python to get the data from the tickets from a particular board, I want to add date variables so that we can get the data for user entered dates. I am new to using the API so unable to figure out how to do this. I will be grateful for any help, Thanks in advance. I tried using the following which is giving me error -:

 

project_issues_specific = jira_instance.get_all_project_issues(project="MED", fields=["description", "summary"])

 

the above is working but giving me the first 1000 when the board was created, I also tried 

 

jira_instance_1 = jira_instance.jql(project = "PROJ1" AND "Epic Link" = EPIC-123 AND issuetype = Story ORDER BY priority DESC, updated DESC)

 

jql_query = project = MED AND issuetype in (Task,Story) AND "Epic Link" = "MED-098" AND updated >="-6M"

 

both of these are giving me syntax errors.

1 answer

1 accepted

0 votes
Answer accepted
Jared Kells April 11, 2023

I think the JQL should be in a string and I don't see any quotes around them, is it a python syntax error?

Something like "project = \"PROJ1\" AND \"Epic Link\" = EPIC-123 AND issuetype = Story ORDER BY priority DESC, updated DESC"

I could be misunderstanding but hope that helps!

Harshita G April 14, 2023

Thanks Jared, yes it was a syntax error, thanks for helping me out. 

Suggest an answer

Log in or Sign up to answer