Bulk update the resolution field in Jira

Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

If issues are in a Done or Resolved status but don't have a resolution set, we can fix this by creating a transition and then bulk-editing your issues with this transition. Note that a transition will need to be added to each status in which Issues need to be updated.

Bulk set issue resolutions with bulk edit and transition

1. Prepare your transition(s).

  1. Edit your existing workflow.
  2. In the diagram view, click Add transition.
    1. To status and From status should have the same value, so the transition will be a loop (meaning issue status won't change).
    2. Name should indicate the action to be performed, e.g. "Set Resolution."
  3. Click the new loop transition to display its properties, and click Post functions.
    1. Click Add post function.
    2. Select Update Issue Field and click Add.
    3. Select the Resolution field and the desired target Field Value, and click Add.
  4. Publish the workflow
  5. Repeat steps 2-4 for each status for which the Resolution field will need to be updated.

2. Transition your issues.

Please be aware that before you begin, to perform a bulk operation, you’ll need the global Make bulk changes permission and the Edit issues, Transition issues, and Resolve issues  project permissions.

  1. Use issue search to filter the issues that need a resolution set.
  2. Click on the  (...)  icon >  Bulk change all X issue(s).
  3. Mark all issues  >  Next.
  4. Choose Transition Issues > Next.
  5. Select your newly created transition and click Next.
    1. You can clear the 'Send mail for this update' checkbox to prevent email notifications from being sent.
  6. In the operation summary screen, click Confirm to apply the changes.
  7. Repeat steps 1-6 for any additional issues or statuses that need resolutions set.

By default, Jira has a 1000-issue limit on the number of issues that can be modified in bulk.


Set resolutions with Automation For Jira

  1. Configure a rule to that uses the 'Scheduled' trigger.  
    1. Configure the rule to run a fixed rate of 1 time per hour or day. 
    2. Enter JQL that will find the issues that need to have the resolution set. 
  2. Next set the Action for the rule to be 'Edit Issue'.  
    1. Choose 'Resolution' for the field to set.
    2. Select the resolution you would like to set the issue to. 
  3. Save the rule and wait for it to execute.  
  4. (warning) Once the rule has executed, you will want to disable or delete the rule since you do not want it to run any longer.  If you do not disable the rule it will continue to update the resolution of the issues returned in the JQL every time the schedule interval is hit.

Use the third-party add-on Script Runner

If you use the Script Runner add-on, this is an alternate solution method

  1. Install the Script Runner add-on.
  2. Build a search for all issues that are using the user-created unresolved status.
  3. Save search as a filter
  4. Use the built-in script to set items in that filter to None
  5. Set the resolved status to the resolution you intend to use

Script Runner usage instructions: https://docs.adaptavist.com/sr4jc/latest/features/built-in-scripts/bulk-fix-resolutions (Cloud) / https://docs.adaptavist.com/sr4js/latest/features/built-in-scripts/bulk-fix-resolutions (Data Center)

(Server/Data Center only) Update resolutions manually via SQL database query

This method is useful when we need to change a large number of resolutions in issues. For example, when removing a resolution, all issues need to have it changed to a different one, which can lead to a long delay in the UI.

(warning) This will make your indexes outdated, and a reindex will be required.

(warning) Before any database changes, make sure to take a DB backup. 

  1. Retrieve resolution IDs.

    SELECT id,pname FROM resolution;
  2. Take note of the resolution ID you wish to be replaced and the new one.

  3. Run the following query to update the jiraissue table. Here's an example to replace all resolutions of a given ID:

    UPDATE jiraissue
    SET resolution = '<NEW_ID>' -- for example, '10000'
    WHERE resolution = '<OLD_ID>' -- for example, '10200'
  4. Run a full reindex.
    (info) If you adapt the query above to run for only a project, then a project reindex is enough. A full reindex is a more guaranteed way to make sure no inconsistencies exist


There is a feature request ticket to allow for directly bulk-editing the resolution field on Jira issues:

  • For Jira Server/Data Center: JRASERVER-7302 - Bulk edit resolution Not Being Considered
  • For Jira Cloud: JRACLOUD-7302 - Bulk edit resolution Gathering Interest


Last modified on Nov 12, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.