Hi,
I need to set the value of a group picker custom field based on the value in Issue Type. How to accomplish that?
Thanks
Hi Tomas,
You can try this code:
FormField ftype = getFieldById(fieldChanged)
FormField fgroup = getFieldByName("Group")
String vtype = (String) ftype.getFormValue()
if (vtype =="2")
// 2 - issue type id for New feature
{
fgroup.setFormValue("jira-administrators")
} else if (vtype =="3")
// 3 - issue type id for Task
{
fgroup.setFormValue("jira-developers")
} else if (vtype =="4")
// 4 - issue type id for Improvement
{
fgroup.setFormValue("jira-users")
}
Please change your issue type ids and rename name "Group" with your Group picker custom field name.
Regards,
Florjan
Hi Vidic,
Thank you for your answer.
Where do I enter this code? I am on JIRA 6.2.2
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomas,
Regards,
Florjan
(I have jira v. 6.1.3. I hope that procedure will be similar in your case.
You can find additional information in Behaviours documentation: https://jamieechlin.atlassian.net/wiki/display/JBHV/JIRA%20Behaviours%20Plugin#JIRABehavioursPlugin-Installation)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.