Automation for Jira: Transition to previous state

Sinio, Paul Andrew April 11, 2021

Hi Atlassian,

 

While AUT-47  is still not yet solved, may we ask for clarification on the workaround below especially on what is meant by "Transition action" below.  I tried to look at the action "Transition Issue"  but i don't think the workaround is referring to that.  Thank you

 

You could use a rule like this:

  • Trigger: Field value changed with status
  • Edit issue and set the 'Previous status' field to  {{fieldChange.from}}

Then you could transition to {{issue.Previous status}} using the 'Transition action'.

 

 

1 answer

1 accepted

5 votes
Answer accepted
Marco Brundel
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.
April 12, 2021

Hi @Sinio, Paul Andrew ,

In Transition issue is it possible to put smart value.

Screenshot 2021-04-12 at 15.15.43.png

Is this what you are looking for?

Regards, Marco

Sinio, Paul Andrew April 12, 2021

Thank you, @Marco Brundel!  I didn't know you can type smart values there

Like Marco Brundel likes this
Walker White
Contributor
September 26, 2021

This works really well as a means to support transitioning to previous status.  However, when you make the custom field, do NOT use "Number" as the type.  It will convert your status ID from 3 to 3.0, and it wont work.  Using a text field works however.

Like Marco Brundel likes this
Hubert Bartkowiak June 8, 2022

@Marco Brundel I've tried to use it, but automation failed with:

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):

Is your string correct?

Marco Brundel
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.
June 9, 2022

Hi @Hubert Bartkowiak 

{{issue.Previous status}}
is correct in my opinion.

I don't know why the message "Destination status could not be resolved" follows and how you can solve this.
I can see that in this and this question it is also about this message. Maybe you'll find a solution there.

Good luck and greetings, Marco

Walker White
Contributor
June 9, 2022

@Hubert Bartkowiak Per my reply above, while it has been some time since I had found my original fix, I believe I recall the symptom being "Destination status could not be resolved".

Can you confirm the smart value you are using is defined as text, like this:

Screenshot_1.png

Also, I think I recall that if you have already made the field as a Number type, you cannot change it.  You have to delete the field then re-create it.

Ivan Ferreira
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2023

I had to do this and I also had the "Destination status could not be resolved" even if the "Previous status" field was type text.

I solved the issue by creating a variable like this:

createvariable.png

Then I used the variable as the transition status:

Transitionstatus.png

Like # people like this
Customer Resolution
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!
August 5, 2024

Need help. my workflow look like this. and i want create automation for :

  • Trigger: Schedule
  • Action 1: Transition from any status to status "ON HOLD"
  • Action 2: Transition back from status "ON HOLD" to the previous status (dynamic) immediately.
    Screenshot 2024-08-06 113510.png
    My question :
  • Do I still need a custom field 'Previous status'?
  • What does the smart value syntax look like for my variable?

 

Suggest an answer

Log in or Sign up to answer