How do I transition an issue to the next workflow state?
Asked by Alec Burton:

I have a very simple workflow:  
When: Value changes for - Smart Checklist Progress  
If: Compare two values - {{issue.Smart Checklist Progress}} matches (\^$\|.\*Done}  
Then: **here's where I need help** Transition the issue - Currently, I have selected Done however, what I would like is for the issue to transition to the next state in the workflow.  

How would I go about accomplishing this task?


Answers:
author: John Funk
body: Hey Alec,

You will have to name the actual status you are transitioning to - you can't just say next step, because there might be multiple steps in some workflows.

comments: author: Alec Burton
body: Hello John, thank you for your reply.  

Each status has its own name. Is there a way to check if the next transition in the workflow is 'Done'?  

For instance, this workflow is linear and each status has to be transitioned to, the checklist is completed, and then the workflow is transitioned to the next status in the workflow.  

Is there a way that I can add a comparator to check if the next workflow status is 'Done' or 'NameOfStatus'?


author: John Funk
body: No, there is no concept of "next status" in automation, because again, a status might go to multiple statuses or there might be statuses with the All transition to them. It's not possible.


author: Alec Burton
body: Is there something you would suggest that would better help me accomplish this task? My primary goal is to transition a task automatically through its workflow when all of the smart checklist tasks have been completed.


author: John Funk
body: I would suggest you do a series of IF/THEN conditions:

IF status = BACKLOG then transition to In Progress

IF status = In Progress then transition to Test

Etc.


author: Alec Burton
body: So I've now run into the issue where the issue only seems to transition a single time, even if the automation rule has multiple transitions.  

I have if status = order computer \&\& smart checklist = done then transition to setup account.

if status = setup account \&\& smart checklist = done then transtion to configure system  

if status = configure system \&\& smart checklist = done  
then transition to done.  

However, I only ever get to the setup account status. Any ideas? Should I pose this as a new question?


author: Lynne Ratcliffe
body: I believe If the first check is met the rule will stop. As this is a checklist, the first check will be met each time. Try using branches for each as I believe they run separately.


author: John Funk
body: Can you share the actual rule that you have so far?


author: Alec Burton
body: When: Value changes for - Smart Checklist Progress  
If: Status is one of - Order Computer  
And: Compare two values - {{issue.Smart Checklist Progress}} matches (\^$\|.\*Done)  
Then: Transition the issue to - Setup Accounts  
If: Status is one of - Setup Accounts  
And: Compare two values - {{issue.Smart Checklist Progress}} matches (\^$\|.\*Done)  
Then: Transition the issue to - Configure Computer  
If: Status is one of - Configure Computer  
And: Compare two values - {{issue.Smart Checklist Progress}} matches (\^$\|.\*Done)  
Then: Transition the issue to - Done


author: John Funk
body: Can you share a screenshot of the actual rule?


author: Alec Burton
body: ![automation_rule.png](https://community.atlassian.com/t5/image/serverpage/image-id/224726i1341FC53821830EF/image-size/large?v=v2&px=999 "automation_rule.png")


author: John Funk
body: You should use the IF/ELSE condition - Sorry for the confusion there.

It would look like this:

![Screenshot.png](https://community.atlassian.com/t5/image/serverpage/image-id/224732i954D4CDB0CDA6C6A/image-dimensions/357x644?v=v2 "Screenshot.png")


author: Alec Burton
body: I'll give this a try and update! Thank you for the clarification.  

edit: The IF/ELSE-IF clauses were the solution.


author: John Funk
body: Yeah, that was my mistake in calling it IF/THEN off the top of my head - sorry about that again. This should do the trick for you.


author: Olena Brazhko_Railsware_
body: [@Alec Burton](/t5/user/viewprofilepage/user-id/4666509) hey!

Check out our article about how to [Transition an issue to the next state when all the checklist items are completed](https://railsware.atlassian.net/wiki/spaces/CHK/pages/3455090689/Transition+an+issue+to+the+next+state+when+all+the+checklist+items+are+completed)

However, you would still need to choose the "destination" status.

If you need more assistance from our team, feel free to reach out to [smartchecklist@railsware.com](mailto:smartchecklist@railsware.com).

Best regards,

Olena

comments: author: Alec Burton
body: Thanks for the reply! I had actually come across this article when I was first creating this automation rule and it helped me a lot.  

However, the automation rule that I created became more complicated and I needed additional help.


author: Olena Brazhko_Railsware_
body: [@Alec Burton](/t5/user/viewprofilepage/user-id/4666509) hey!

I'm glad to hear you have figured it out!

Have a great day,

Olena


author: Lynne Ratcliffe
body: I believe If the first check is met the rule will stop. As this is a checklist, the first check will be met each time. Try using branches for each as I believe they run separately.

Sorry, meant to answer in the thread above. Updated


Tags: checklist