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
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:
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...
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:
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:
Notes:
---
Let us know if this is helpful!
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stephen Wright _Elabor8 good point, I did not realize yesterday that Mark's solution required an additional app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ste Wright 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:
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):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ste Wright 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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Mark, that is exactly what I was looking for. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, this is my automation and dont work for me. Please can you tell me what im doing wrong?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The easiest way to do this is using {{changelog.status.from}} You do not need any custom fields. I have Jira Cloud and it works perfectly.
Example
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{{changelog.status.fromString}} will give you the actual status in text. However, you can't use it for transition. It will give you 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):"
You have to use the number of the status and it comes from "FROM". Try adding an action to comment on issue {{changelog.status}} it will show all the available values
Example
ChangeItemBean{fieldId='status', field='status', fieldType='null', from='13961', fromString='In Requirements', to='11200', toString='Blocked'}
In this case "In Requirements" status = 13961 and that's the value it will derive from {{changelog.status.from}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me based on a transition issue trigger - but not on a field being modified.
Does it work for you using the Field Value Changed trigger?
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, This will have information only when the status is changed. In your case, the only option I can think of is to store the previous status in a custom field when the status is changed and use it when your field is changed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes that's what I thought - that's why I went with that solution above.
Still an awesome option for Issue Transitioned trigger though :)
Ste
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.