Forums

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

How do I add new transition to specific story type

Princess February 14, 2022

Hi all, please I need help.

I am trying to add new transition(UX Review) to our user story workflow and this transition is only required if there is a design associated with the ticket and has not been reviewed yet. Is there a way I can do this?

Note: not all our stories is associated with design, I mean not all our stories has the UI/UX component so how to make this transition to only affects stories with design is where am stuck.  

Thank you 

1 answer

0 votes
Fabio Racobaldo _Catworkx_
Community Champion
February 15, 2022

Hi @Princess ,

I assume that design is, in your context, an issue type.

In order to implement that in your workflow, you should use a scripted condition, containg all your logic, provided by Script Runner (https://scriptrunner.adaptavist.com/5.6.8/jira/tutorials/scripted-conditions-tutorial.html)

Hope this helps,

Fabio

Princess February 15, 2022

Thank you so much for your input @Fabio Racobaldo _Catworkx_ the design ticket is not a separate issue type from our story issue type. We have some of our story issue type that has the UI/UX component tag on them so this new transition is only going to affect those tickets with the UI/UX tag. 

Fabio Racobaldo _Catworkx_
Community Champion
February 16, 2022

Hi @Princess ,

please let me know the name of field (I don't know if you are using Component field with a specific value). I could provide u the scripted condition code.

Ciao,

Fabio

Princess February 16, 2022

Hi @Fabio Racobaldo _Catworkx_ yes we are using the components 

UI/UX Task, UI/UX underway, UI/UX Done for our design tickets. So I would like a condition where tickets that has these components tags should move from peer review in progress——>UX Review and tickets all other tickets should move from peer review in progress ——> Ready for Acceptance 

our transition is something like peer review in progress—>UXReview—>RfA. The UX Review status is the new one we are adding 

 

Thank you 

Alisha 

Fabio Racobaldo _Catworkx_
Community Champion
February 16, 2022

Hi @Princess ,

here two scripted condition code examples :

For transition to UX Review

import com.atlassian.jira.bc.project.component.ProjectComponent;
import com.atlassian.jira.issue.Issue;

Collection<ProjectComponent> components = issue.getComponents();
for(ProjectComponent comp : components){
if(comp.getName().startsWith("UI/UX")){
return true;
}
}
return false;

For transition to Ready for Acceptance 

import com.atlassian.jira.bc.project.component.ProjectComponent;
import com.atlassian.jira.issue.Issue;

Collection<ProjectComponent> components = issue.getComponents();
for(ProjectComponent comp : components){
if(comp.getName().startsWith("UI/UX")){
return false;
}
}
return true;

I assume that all three values can be grouped with start "UI/UX". If not you can use all three specific values in OR (||).

Hope this helps,

Fabio

Princess February 20, 2022
Fabio Racobaldo _Catworkx_
Community Champion
February 21, 2022

ciao @Princess , please let me know if it works and remember to accept my answer

Princess February 23, 2022

Thank you @Fabio Racobaldo _Catworkx_ I did not end up using the script because I need to learn more about script runner to know how it works and that add on is expired on our Jira. I just added the condition ‘value field(JSU)’ for components in UI/UX task. 

This of course will be valuable for me in future. 

Thanks again. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events