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
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.