Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. from jira import JIRA
  2.  
  3. jiraUrl = ""
  4. username = ""
  5. project = ""
  6. # I'm not sure if this is universal, but it's the ID for closed issues on our instance
  7. closed_issue_id = "701"
  8.  
  9. # This needs to be an API key
  10. password = ""
  11.  
  12. jira = JIRA(jiraUrl, basic_auth=(username, password))
  13. issues = jira.search_issues("project=" + project + " and status=Resolved")
  14.  
  15. # close all of these issues
  16. for issue in issues:
  17. jira.transition_issue(issue, closed_issue_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement