Is there a post-function in jira workflows that can convert to the previous status?
Have a client that counts a specific status, like a vote, and then would like it to automatically transition it back to the previous status. (Yes, I know this is clunky)
Or would it be best to accomplish through script runner?
Definitely needs to be a full transition back to a previous status, as transitions are the only way to change a status.
You will need something like Automation or Script Runner to provide an automatic transition back.
However, a better solution would be to prevent the forward transition in the first place. I'm struggling to think of a use-case where going forwards only to have it automatically undone would make sense.
Thanks! I had the same issue understanding why.
The customer is using this to count votes on an issue. So let's say the issue is in status 'Pending Votes', then people can choose 'Up-vote'. That status is being tracked, so instead of having people manually transition back to 'Pending Votes' (which never happens) they are looking for an automatic option to go back seemlessly to 'Pending Votes' afterward.
I tested the script runner workflow function - Fast-track transition as this may be a potential solution but can't transition correctly after the post function.
Here is a use case where we need to return to the previous status.
Our PM (we use JIRA for classic program/project management) is in a status called Scope. While she is scoping, she needs to answer a series of questions for which JIRA will provide scores and a recommendation, then (still in Scope) she will take action based on the recommendation.
We use post functions on transitions to score the questions and provide a recommendation. The issue should go through a loop: from Scope, it goes through one transition to add numerical scores based on answers to questions, then it goes through a second transition that interprets the numerical score and recommends whether to take additional risk-control measures. (The user clicks Workflow > Score FMEA to engage the first transition, which invokes the second, and a third to return it to a status in our traditional order of operations.)
This scoring could just return to Scope, but we want to embed that scoring loop in other statuses, too, so that if risk conditions change it can be rescored. So... we need the last transition in that loop to return the issue not to Scope but to whatever status it was in before the PM chose to score.
We are looking at a Scriptrunner solution, but I am hesitant because it will require a steep learning curve for my team. I keep looking for a post function designed to do this with an easy user interface, because intuitively it makes sense that someone would have built it already. So far, I'm not finding it.
Adding this... A solution might be to build a unique scoring loop onto any transition where the PM might want to re-score.
However, we have four scoring routines (four different questionnaires around critical procedures and risk management) and 10+ steps in the core of our workflow. The build and maintenance time to keep 40+ instances of scoring routines is prohibitive and, frankly, unwise.
We will be adjusting this loop of transitions to make it more space- and time-efficient (fewer post-functions, adjusting the order of automations), but when we can have JIRA detect the correct status to return to dynamically based on where they started, we only have to build one scoring loop for each questionnaire, which we can call from any transition in the workflow.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events