Skip to content

Instantly share code, notes, and snippets.

@luksi1
Created September 6, 2019 00:16
Show Gist options
  • Save luksi1/6e2e441e622263b670afef99dc627895 to your computer and use it in GitHub Desktop.
Save luksi1/6e2e441e622263b670afef99dc627895 to your computer and use it in GitHub Desktop.
Transition resolved issues to closed in jira
from jira import JIRA
jiraUrl = ""
username = ""
project = ""
# I'm not sure if this is universal, but it's the ID for closed issues on our instance
closed_issue_id = "701"
# This needs to be an API key
password = ""
jira = JIRA(jiraUrl, basic_auth=(username, password))
issues = jira.search_issues("project=" + project + " and status=Resolved")
# close all of these issues
for issue in issues:
jira.transition_issue(issue, closed_issue_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment