We recently imported a project from an older tracking tool to JIRA and converted some of the issues into Epics. All epics show up on the backlog regardless of their state, so I need to mark all of the old ones as Done. It seems like this should be easy to do in bulk through the API, but I can't find an appropriate method to make this change.
I could do it manually, but it's well over 100 issues and two factors make it more difficult:
Any help would be much appreciated!
Oh OK, I misunderstood your original question - what you really want to do is change the value of the Epic Status field. One way you could do this is via the update issue REST API:
You do a PUT on "https://<JIRA host>/jira/rest/api/2/issue/<Epic key>" with the following body
{ "fields": { "customfield_10007": {"value": "Done"} } }
where customfield_10007 is the id of the "Epic Status" custom field - you can find out the id by going to the Custom Fields admin page and viewing the "Epic Status" field - the id is in the URL.
For this to work, however, the "Epic Status" field must be added to a screen, used by the project.
Another approach is to use internal REST calls for JIRA Agile - they are not public and are subject to change, so I don't advise relying on them.
I found an alternate solution - Epic Status is available as a field on the Bulk Change edit screen so I was able to clean them up that way. Still curious about an API call though, if anyone knows of something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Epics are issues so you can use the regular JIRA REST API for transitioning an issue:
POST /rest/api/2/issue/{issueIdOrKey}/transitions
See the full documentation for all the possible input data. You'll need the transition id from the current status to the Done status, which you can get by looking at the workflows which the project uses (one of the JIRA Agile workflows).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried checking there, but unfortunately there doesn't seem to be a transition that does what I'm looking for. When you click the dropdown on an Epic from the backlog screen there's a 'Mark as Done' option which indicates that the epic in question no longer belongs on the backlog - this is completely separate from the workflow and status.
In my case the imported epics are already in closed states with resolutions assigned, but I couldn't find a way to import them as 'Done' in the backlog sense, or update this with the API. The best I could do was manually change 'Epic Status' through the Bulk Change edit screen for the closed Epics.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.