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!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.