Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Is there a way to add a transition to send back to the previous workflow status?

We have a transition from ->All to Info Needed status. It means in any other status (to do, backlog, in progress, testing, etc) a user can click on Info needed and assign the task issue to someone else asking for some information needed to continue work. So when that other person provides the info, I want the issue to go back to the previous status where it was before info needed. How can I achieve this? via automation? 
note I am just project administrator, not instance admin, using Jira Software Data center. 
Thanks

2 answers

1 accepted

2 votes
Answer accepted
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 16, 2023 • edited

Hi @Miguel Rodriguez 

It is possibly natively, but you will need an Instance Admin to help set this up (only for Step 1).

This process will work as follows:

  1. Use a Custom Field to list the Status ID of the Previous Status
  2. Use Automation Rule 1 to populate the Custom Field
  3. Use Automation Rule 2 to reverse the transition

See below for instructions on how to do this

---

Custom Field

You'll need to create a Custom Field, which requires Jira Admin (i.e Instance Admin access). Then...

  • Go to Jira Administration > Issues
  • Select Custom Fields from the left-hand menu
  • Press the Add custom field button
  • Create a "Text Field (single line) custom field - for this example, I've called it PreviousStatus

Note: The field does not need to be on a Screen

---

Automation Rule 1

The second Automation Rule will transition to the previous Status, based on the value in the Custom Field above.

Automation Rule 1 will populate this field every time any Issue is transitioned - the rule will look like this:

  • Trigger: Issue Transiitoned
  • Action: Edit Issue
    • Field = PreviousStatus
      • Value = {{#changelog.status}}{{from}}{{/}}

Note: This rule uses a smart value, to reference the Status that the Issue was transitioned from when this rule was triggered

---

Automation Rule 2

We can now reference the previous Status in this Automation Rule - for example:

  • Trigger: Field Value Changed
    • Field = <Field Here>
  • Condition: Issue Fields Condition
    • Field = <Field Here>
    • Condition = equals
    • Value = <Value Here>
  • Action: Transition Issue
    • To Status = {{issue.PreviousStatus}}

Notes:

  • Smart values are used again - this time to reference the Status ID stored in the PreviousStatus field, which was populated in the first rule
  • You can add whatever Trigger and Conditions that are relevant to your scenario - above are just examples

---

Let us know if this is helpful!

Ste

Hi @Stephen Wright _Elabor8_ 

 

Can you display the automation ? (screenshot)

Thanks Stephen, I will keep this one in mind but it seems the suggestion from Mark is a straightforward  out of the box post function. 

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 17, 2023

No worries @Miguel Rodriguez 

The other recommendation is definitely simpler and I would recommend using it if it is available to you.

But it is from an App rather than native functionality; specifically this App: Jira Misc Workflow Extensions (JMWE) 

---

FYI @Marcelo Ignacio Cid Abud - the rule is detailed above; providing screenshots for each screen would be cumbersome.

Ste

@Stephen Wright _Elabor8 good point, I did not realize yesterday that Mark's solution required an additional app.  

@Stephen Wright _Elabor8_ So to understand correctly I have couple of questions:

In the first rule, then the transition goes from any previous status to my target status, we save the previous status to the custom field, right? That is OK. However, on the second rule you posted above. you have this:

  • Trigger: Field Value Changed
    • Field = <Field Here>

So are you expecting that the user changes other field? In my workflow the issue is sent to a Need info status, the person providing the info will add a comment and the idea is to send it back to the previous status when she clicks on Info Provided as part of the workflow buttons. I am not changing the custom field in any screen, so I would expect the trigger of the 2nd rule to be the transition out of my current (Info needed status), so then I would read the custom field value and apply it to where I want to transition to (the original status before sending it to info needed)
Can you clarify the behaviour of the second rule and  how are you reading the previous status from the custom field?
I pasted the workflow below. So for example if I am in Testing and do Info Needed, once I transition out of Info needed I want to go back to testing , with the automation I am getting an error: "No transitions to specified status could be found for issues (with current status):

TEST-768 (To Do - 10000)" so do I need to have transitions to from to do to everything? it does not make sense. 
 workflow1.png
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 20, 2023

Hi @Miguel Rodriguez 

I made some assumptions about what the Triggers, etc would be - but this is still just an example. You can set the Trigger in Rule 2 to be anything you like.

Although I'd probably recommend it isn't a "Transition Issue" Trigger - that seems counterproductive. For example, it could be based on the Comment itself, as long as it is from a specific user (Reporter, etc).

---

In terms of transitioning to the previous Status - yes, it needs to be possible to go directly from Info Needed to any relevant Status. If the transition is not possible, the Automation will fail. 

Your current Workflow would not support what you're looking to do using the Automation Rule above - you'd need multiple IF/ELSE Conditions, and multiple transitions to get back to "Testing" (for example).

I'd strongly recommend making all Statuses "All" for transitions, if this is an option.

---

If you'd like more specific instructions, can you let us know...

  • The exact process these Issues would go through?
  • If making the Workflow more open is an option?

Ste

Like Miguel Rodriguez likes this

Hello @Stephen Wright _Elabor8_ thanks very much.  Based on the error I was getting, I assumed what you confirmed, I need a valid transition to get to the original status, but I would not like all to all because there are some cases where we want to have a sequence of events, specially for some other more complex workflows. I am going to look at them and see if there is  compromise between a bit of controlled sequence and a flexible return to previous status can be done. Thanks for all your help and clarifications Stephen. 

2 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 16, 2023

Thanks a lot Mark, that is exactly what I was looking for. :-) 

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events