Forums

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

Can we make a conditional that a ticket cannot be transitioned unless an status is done?

Senthilkumar
Contributor
January 6, 2019

Hi Team,

 

I have workflow , which got Code review status. I don't want to the workflow to move further until the code review is successfully. 

can some help me on this one? 

4 answers

2 votes
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.
January 6, 2019

Hello,

I am not sure I understood your question. Transitioning means to move an issue between statuses. How you want to have a status Done, if an issue can not be transitioned?

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.
January 7, 2019

I am not sure why you need Yes and No. Your status says that the code review is completed. Why would you need Yes and No?

You can Add a status "Code Review" before the Code Review Completed status and it will do the job.

Otherwise you would need a plugin.

For example, you could use the Power Scripts plugin:

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

Suppose, the Yes and No is a radio button custom field with the name Code Review Completed.

Then you could write a condition like this:

if (#{Code Review Completed} == "Yes") {

  return true;

}

return false;
0 votes
Olga Videc
Community Champion
January 7, 2019

Hello @Senthilkumar

I would do this: 

  1.  Added a Filed Code review (string filed) after finishing the code review you would write YES or NO in it.
  2. Add a condition to the transition from "code review completed"  -> "QA Tested" 
    1. Condition Hide transition from the user (Condition to hide a transition from the user. The transition can only be triggered from a workflow function.)
    2. Condition Value Field (JSU)Jira.PNG

                       Field  Code review 

                     Condition

                     Value YES 

To use this condition  Value Field (JSU)  you need an add on caled "Jira suite Utilities" awesome add-on for workflows.

Repeat it for NO

SO the transition would be triggered/visible when one of the values is entered

0 votes
Senthilkumar
Contributor
January 6, 2019

Hi @Alexey Matveevworkflow.PNG

 

This is my workflow. If the code review completed i can move to the next step that is QA testing, and if its NO i should move to the next step. I need an condition for it.

Although i have changed the workflow, to go back DEV In progress if the CODE Review is failed (NO), i am not sure if its correct.

Thanks for your help

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.
January 7, 2019

I am not sure why you need Yes and No. Your status says that the code review is completed. Why would you need Yes and No?

You can Add a status "Code Review" before the Code Review Completed status and it will do the job.

Otherwise you would need a plugin.

For example, you could use the Power Scripts plugin:

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

Suppose, the Yes and No is a radio button custom field with the name Code Review Completed.

Then you could write a condition like this:

if (#{Code Review Completed} == "Yes") {

  return true;

}

return false;

0 votes
Ollie Guan
Community Champion
January 6, 2019

I wonder if my understanding is correct? Prevent workflow flow from going to new state before code review is complete?

So how do you judge that the code review operation is complete? Is it a third-party system or is it integrated through Jira and code management tools?

Senthilkumar
Contributor
January 6, 2019

Yes you are correct. QA team will do the Code review and if they say NO, then it should be move the next step.

sorry i am new to this, i am not sure if i explained correctly. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events