Choosing a specific transition when I have multiple going to the same status

Steven Rhodes April 26, 2022

I have a workflow where I have two transitions into the Done status. One is to cancel the request and sets the resolution to cancelled (this one is available from all other statuses). The second one goes from In Progress to Done and gives you a resolution screen to set it yourself. I am trying to use automation to set the resolution for some projects using this workflow transitioning via the In Progress to Done, but when I select this in Automation for Jira, it chooses the transition that cancels the request.

image.png
How can I specify or differentiate between these two transitions? I see the transition ID of 101 for Done (and 31 for Cancel Request), but in the automation I don't know how to use the "Transition Match" feature. All the regex I have tried doesn't work.image.png

I have tried to bypass this by using the Cancel Request transition it insists on using but I can't set the Resolution because there is only a Comment field on the transition screen (I have managed to set a generic comment though). This results in the transition to Done but means the resolution is still Cancelled.image.png

 

 

 

 

3 answers

1 accepted

0 votes
Answer accepted
Michiel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2024

Found it, with the help of Atlassian Support:

The regex is not respected and the wrong transition is applied because of a condition:

  • Only users in project role Service Desk Team can execute this transition.

The automation rule had "Actor" set to "Automation for Jira" and that is still considered an add-on and does not have the permission (project role Service Desk Team), which is why an error is produced, even if the transition does occur (with the wrong transition).

It was solved by adding an additional condition (and set it to "Any of"):

  • Only users in project role atlassian-addons-project-access can execute this transition.

Now the regex is respected and it does use the correct transition.

I have asked Atlassian Support to improve & correct the error messaging so it will become clear what is really happening. In my view it should not transition at all and produce an error about missing permissions because of a set condition or something like that.

1 vote
Jeffrey Bistrong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2023

This worked for me, i just had to match the transition name exactly, i couldn't get it to work when the transition name had spaces in it, so replaced the space in the transition with an underscore, and now its working

Monosnap View workflow — DB_CR Workflow v1.2 - JIRA 2023-02-24 13-37-23.pngMonosnap Automation - Jira 2023-02-24 13-35-46.png

1 vote
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2022

Hi @Steven Rhodes 

Under where you have set the Done status, there is an option to "+ add regex to distinguish between multiple transitions to the same status ".

trans1.pngtrans2.png

Here, you can enter some regex based on the individual transition's name in order for the correct transition to be used.

Either this, or you can just add a post function on the specific transition to set the Resolution, meaning you don't have to 'edit' the resolution field, nor do you have to have the resolution on the transition screen (this may be the easiest solution).

Hope this helps!

Steven Rhodes April 28, 2022

 

Thanks for your reply

I did mention that all the regex I have tried didnt work, and I can't find examples that would help me. I can see that in the example in the box it says

 .*resolv.*

And i have tried .*done.* for example

Also there are already two transitions to Done and i'd rather not add a third that sets the resolution to Done. 

Like # people like this
Jenny Severin June 3, 2022

I am having the same problem.

Like # people like this
Steven Rhodes June 16, 2022

Hi @Jenny Severin I did in the end create a new workflow as I was unable to get the automation to recognise the regex. This was a lot more work but it works now.

Marcin Błaszczyk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2022

Hi Guys,

in 

.*resolv*.

 You Have to type a specific name of transition in.

@Steven Rhodes in Your issue You have to type:

.*Done*.

Benjamin Peikes February 2, 2023

Why would it have to be .*Done*. and not Done ?

Wouldn't that match anything that had Done in it, or is ".*" and "*." Atlassian's regex delimiter?

Jean-Christophe Gonzales March 5, 2024

same problem in march 24'

whatever the regex used I get the error : "Destination status could not be resolved. If using a smart-value ensure this resolves to a numeric status ID or untranslated name for issues (with current status)," 

Dalhart Dobbs May 21, 2024

I am also having a similar issue where I have two transitions that exist between statuses dependent on post functions and validators and I want it to happen automatically if certain conditions are met. I am still getting the "Destination status could not be resolved. If using a smart-value ensure this resolves to a numeric status ID or untranslated name for issues (with current status):..." error.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events