Hi,
I want to set a number field by selecting another field. The custom field "Category" is a select list (single choice), the custom fields "Weight Order" and "Weight Project" are number fields with a default value and the custom field "Customfield" is a number field.
def category = issue.getCustomFieldValue(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Category")).getValue(); if(category == "Order"){ def weight = issue.getCustomFieldValue(ComponentAccessor.getcustomFieldManager().getCustomFieldObjectByName("Weight Order")); } if(category == "Project"){ def weight = issue.getCustomFieldValue(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Weight Project")); def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Customfield"); issue.setCustomFieldValue(cf, weight);
Best Regards,
Louisa
The custom field "Category" is a multiple choice select list!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.