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
...what is your problem ?...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.