You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Is it possible to execute JQL query from python script and get the result in a xml or character delimited format.
Regards,
Urmimala
(NagraVision)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Urmimala Biswal
Can you clarify for which purposes you need a JQL function in Python?
I'll try to help you when I get to know it.
Best regards, Mariana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
from jira import JIRA
USER = 'you@yourdomain.com'
API_TOKEN ='<api token>'
options = {"server": "https://yourdomain.atlassian.net"}
jira = JIRA(options, basic_auth=(USER, API_TOKEN))
query = """
project = "MVP"
AND status = "Development done"
AND issuetype = Subtask
ORDER BY lastViewed DESC
"""
my_jql = jira.search_issues(query)
for issue in my_jql:
print (issue.key)
print (issue.fields.customfield_10233)
##############################
#projects = jira.projects()
#for project in projects:
# print (project.key)
# All fields on a ticket
#ticket = 'TICKET-653'
#issue = jira.issue(ticket)
#for field_name in issue.raw['fields']:
# print ("Field:", field_name, "Value:", issue.raw['fields'][field_name])
#summary = issue.fields.summary
#print('ticket: ', ticket, summary)
##############################
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes - use the search REST API. Also, requests is a good client library which you can use in Python to execute the REST call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.