Forums

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

[Fast-track transition an issue] I want issue status to be changed automatically.

jypark March 13, 2019

Hello!

I want issue status to be changed automatically by using 'Fast-track transition an issue'.

Attached photo is that i've tried.

[Condition]

cfValues['Designated Person'].getValue() != 'None'

 

[Additional issue actions]

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue

String userName;

switch(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Designated Person").toString()){
case "[RND] SF": userName = "haimai";break;
case "[RND] HanPrism": userName = "Hoang";break;
case "[RND] HanPHI": userName = "Sunil";break;
case "[RND] CPS, HanTops, ECOMS, BTMS": userName = "hjyun";break;
case "[E&S] IPS, V&V": userName = "jskim";break;
case "[E&S] Solution": userName = "ejjoo";break;
case "[CS] Nuclear Maintenance Service": userName = "buggi79";break;
case "Sales": userName = "st";break;
case "Financial Management": userName = "fm";break;
case "General Management": userName = "gm";break;
}

issue.setAssignee(ComponentAccessor.getUserManager().getUserByName(userName))

 

What i want is that if i click the "[RND] SF" in the 'Designated Person'(Select List Field), then 'Haimai' is assigned automatically as the assignee and issue status also automatically changed from Registered to Assigned.

Also, if 'None' is selected in the 'Designated Person'(Select List Field), then it should not be changed. Issue status has to be Registered.

Attached photo is that i've tried. However, the function does not work. What should I fix?

I'm not a developer, so I don't know much about the code.

I hope you can easily explain to me.

In addition, I am using 'ScriptRunner' as an add-on feature.

Thank you!! ; D

 

캡처.PNG

1 answer

0 votes
Marc Minten (EVS)
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.
March 13, 2019

...what is your problem ?...

jypark March 13, 2019

sorry! I fixed the question!

Suggest an answer

Log in or Sign up to answer