Forums

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

Workflow Set Status based on transition input

Mitch Wiemans October 29, 2018

Hi,

I have a question which may have been asked multiple times, however I can't seem to find the correct solution.

We have a simple workflow to start with. 

We create a issue and the status is: New Issue.

Then we want to add 1 transition which can go to 1 of the 2 next statuses. 

The transition is: Meets SLA Requirements. In this transition there is a screen: Yes or No. 

When Yes is checked we want to automatically go to the status: Prepare Maintenance. If  No is checked, then we want the transition to move to the status: Waiting for customer...

 

How can we add this validator to the transition? I'm only able to select the standard validators like Permissions etc.

 

Thanks in advance!

Best Regards,

Mitch

 

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
October 29, 2018

Hello,

You would need an add-on for it. For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could write a post function with a code like this:

if (#{Meets SLA Requirements} == "Yes") {
  autotransition(121, "PRJ-123");
} else {
  autotransition(122, "PRJ-123");
}

Where 121 is the id of the transition leading to the Prepare Maintenance status.

122 is the id of the transittion leading to the Waiting for customer status.

You can find ids of transition if you open the required workflow.

You can find more info about post functions here:

https://confluence.cprime.io/display/JJUPIN/Customizing+workflows

Mitch Wiemans October 30, 2018

Thanks for the reply.

 

I understand that this certainly can be done with add-on. But is this not possible without any add-on?

Since it is a pretty common step in a workflow in my opinion.

Alexey Matveev
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.
October 30, 2018

You could create a Service Desk automation rule. Add the Issue is Created trigger. Then add condition ( "Meets SLA Requirements" = "Yes") and then add the Transition Issue action to transition this issue to the Prepare Maintanance status.

Then create the same rule for the "Meets SLA Requirements" = "No"

Mitch Wiemans October 30, 2018

I will look into this today. Thanks for the info!

Mitch Wiemans October 30, 2018

This is working correctly for me! I have added 1 transition between the new Issue and Prepare Maintenance & Waiting for customer. When it goes to the transition in between (Check SLA Status), it will automatically go further thanks to the trigger.

Mitch Wiemans October 31, 2018

@Alexey Matveev Is this also posible to do with the extension: Jira Misc Workflow Extensions?

So that we have a transition with a yes or no answer, and then go to 1 status based on the selected answer?

Alexey Matveev
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.
October 31, 2018

You can also do it with JMWE. But I do not have a script for this plugin.

Mitch Wiemans October 31, 2018

Ok, thanks for the information!

Suggest an answer

Log in or Sign up to answer