…. and now we explain what happen and how solve or which workaround we can apply ;).

Scenarios

Sometimes we forgot change Resolution field when we close the issue and, after, we wanna change it with the correct value

BUT

we cannot do this. As shown in following GIF:

We can change Fix Version/s field but Resolution is …. unchangeable….. unbelievable.

Clear. The question is: How we can solve?

 

The situation is clear and we can solve in several ways. Let me introduce how:

  • A very easy solution is change all own JQL queries and use only the State field to understand if issue is resolved. Ok. This is very easy but database stay dirty 😉
  • Remember set Resolution Field. OK.
  • Set a post-function: set Resolution field when status change to Done, Resolved, etc.

Seriously. How solve the problem?

ok. Talk seriously. Exist a workaround described in this post of Atlassian Community.  Let me time: I wanna describe better each steps (step is in Bold + Italic)

  1. Backup your instance (Better before every operation of this type).
  2. Copy the workflow for the affected project. Better have a copy. If we do a wrong action, we can restore the correct Workflow;
  3. Add a transition for the affected status(es) called ‘Fix Resolution’ with the destination as the step it originated from (so it doesn’t change the status).  Ok. We start doing first action: Modify the workflow.
  4. Add the ‘Update Issue Field’ post-function to that transition, as in the example below:
     This is a standard out-of-the-box action.NOthing to say: Follow the step. 
  5. Make sure the transition has been configured to fire Issue Resolved event to get Resolution Date set properly. Nothing to say: Follow the step.
  6. As in our Configuring workflow schemes, add a new workflow scheme and associate the appropriate Issue Types to the new workflow. Very important. Remember always this: choose the right issue type and the right workflow.
  7. Modify the project so that it uses the new workflow. Be careful:  Now we are applying the changes.
  8. Using a Bulk Operation to edit those issues using the ‘Fix Resolution’ transition. This will reset the field to None. In this case we do a default value to none. This fire the workflow and change the field to right value.
  9. Change the project back to the original workflow. Back to the origin.

This is the only solution?

No. We can use also Script Runner , Groovy Amigo, as shown by MrAddon.

By Artigiano Del Software

Advertisements
Posted by:artigianodelsoftware

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s