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.
I'm looking for a way to keep track of the time spent on Reopened tasks beyond the expected value. Im using python-jira library. As a result I want to get the date of the status change and the amount of time that will be spent on her decision.
I've already written some code, but I haven't gotten the result.
def get_issues_from_task(username=None, token=None, project_key=None):
jira = JIRA(basic_auth=(username, token), options={'server': SERVER})
jql = 'project=' + project_key + ' AND status changed FROM Closed TO Reopened'
issues_list = jira.search_issues(jql, json_result=True) #get the issues list
for i in issues_list['issues']:
isssues_key = i['key']
issue = jira.issue(res, expand='changelog')
changelog = issue.changelog
for history in changelog.histories:
for item in history.items:
if item.field == 'status':
# here I need to get the date of the status change to Reopened and the new time it takes to do it.
return data
Tell me please how I can finish this code or redo it.
Hello,
Take a look at the @Chris Young4 answer in this thread. It is a good point to start. You will need to create a loop and make some calculation to achieve what you want.
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.