Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Back to last step in workflow

Gaven Ray April 12, 2016

I am trying to come up with a way to reopen a task back to the step it was in before. So I have a designed workflow with approvals and each step has an approved denied step. Denied goes to closed. Is there a way to reopen the ticket and have it go to the previous Step in the approval process only? I do not want to have the reopen be a way to by pass a approval step or force it to go through the whole thing again. I think Groovy is the best way but i lack the skills to write a groovy script.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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, 2016

You don't need any scripting to do this, unless you want to automate it for some reason.

To "go back" in a workflow, you need to create a transition from the current step to the previous one (or earlier).  If you do need to automate it, you still need that transition for the automation to use it!

Gaven Ray April 12, 2016

I am aware of how to create a step back. That part is easy. I want to prevent it from going from closed to a step that it has not been in there by bypassing the approval process. Here is the proposed workflow. 

IR-4568.JPG

Nic Brough -Adaptavist-
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, 2016

Ah, I see, I'm afraid I didn't get that from the question.

Yes, you can script this - have a field that says "previous status", set it as you go into "closed" and then use conditions to say "can only go back to status named in that field".  Or you can script the condition

But, have a look at the JIRA Misc workflow add-on before you dive into Script Runner - it has "previous status" conditions in it already.  If you already have SR, then use it (it can do everything JMWE can do, and a lot more), but if you don't have other uses for SR, this might be a better option for you.  (Yes, I'm doing my company out of a possible SR sale there, but JMWE may be better in this case, and I don't want to be too biased.  But, SR is great!)

Suggest an answer

Log in or Sign up to answer