user3492556
user3492556

Reputation: 47

get issue close date

I want to know the date in which a given issue is closed. haw can I get issue close date via Jira rest API?or from Jira rest java client? I try to get the update date but it give the date of last update and not the close date. Is there any way in Jira rest java client or in Jira rest API? Thank you for answering me.

Upvotes: 2

Views: 1670

Answers (1)

ThePavolC
ThePavolC

Reputation: 1738

When searching for issues you need to add expand parameter into search_issues() See here.

Then all changes in issue should be in changelog field. You can list them in similar way:

from jira.client import JIRA
jira = JIRA(options={'server':'http://jira.server.address.com'},basic_auth=('user','password'))    
issues = jira.search_issues('key=PR-1',expand='changelog')

for issue in issues:
    print issue.key
    for change in issue.changelog.histories:
        print "== Change id ==", change.id
        for change_item in change.items:
            print "  ",change.created, change_item.field, change_item.fromString, change_item.toString

Upvotes: 2

Related Questions