Hey Jira Community!
I'd like to clear my Fix Version field after a Resolution has been set to anything other than Done or Fixed. In my current Workflow, when an issue is Closed, a post-function screen pops up, prompting the user to choose a Resolution value. The Resolution value options include the following:
I'd like a post function (or something else) to automatically clear my Fix Version field, when an issue is Closed, based on the Resolution value. I want to clear the Fix Version field when the Resolution is not Done or Fixed. Right now, my post transition function clears Fix Version regardless of the Resolution value, leading me to believe the post function may not be the appropriate place to try and do this. Any insight would be appreciated!
You could create a transition and post-function on a Status with a condition to check the value of Resolution. I personally would rather do it with automation, as implementing any advanced logic in Workflows is a nightmare...
If you haven't used Jira Automation before, have a quick read here.
Then, you can create a new automation that looks like this:
To describe what it does:
And you're done. Publish the Rule under a name. Under Rule details, you might want to limit the automation scope to just selected Projects. This time the automation will be triggered only when a ticket in the given project is being resolved.
But be warned: Atlassian limits how many executions you have per month on Cloud, depending on which products you have and on which subscription. To see how many executions you have, navigate to Global automation settings in Jira and then Usage
Thanks so much for the thorough explanation! It makes perfect sense. I'm just struggling to get the rule to execute. Have confirmed it's turned on. Maybe my JSON formatting is the culprit? Here's what I have:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jessica Huebner ,the format looks right. Tested it and it works for me. As @Walter Buggenhout mentioned in his response, you actually don't have to write it. You can just leave it blank. As for why your automation doesn't trigger, please check your Audit log:
Could you share what's in there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Looks like my rule isn't firing at all. I'll keep fiddling...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just thinking maybe I have this part set up wrong. I initially had "Value deleted" but then changed it to "Any changes to the field value" but still can't get it to trigger (I have a test ticket I'm closing/reopening):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Usually, the Resolution field gets a value on a transition screen. You might want to remove the Edit issue in the For field to select all Operations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Dawid. Setting the change type to "Value added" and For to "Transition issue" is what did the trick. Thanks for all your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jessica Huebner,
An automation rule like this should let you do the trick:
Leaving the value for the fix version field blank in the final Edit issue step will clear the field value.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! Looks like I might need to write some JSON to clear the field (leaving it blank didn't seem to do the trick for me. Have replied in another thread!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jessica Huebner,
Just to keep things consistent here and relating to your trigger:
Just thinking maybe I have this part set up wrong. I initially had "Value deleted" but then changed it to "Any changes to the field value" but still can't get it to trigger (I have a test ticket I'm closing/reopening):
This is how I set it up in my scenario and successfully tested this:
You mentioned in your question that you are trying to trigger this event while you are closing an issue. That is a transition during which you add a value to the Resolution field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked like a charm! I knew it had something wrong, just couldn't see clearly what. Thank you so much for your help. Really appreciate it :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.