Hi,
I have a script-post-function on some transition and need to get value (1 level) from the cascading select list, and, depending on the value assign issue to some user.
Could you please help with this?
I've tried to compare like
if (cfValues['Custom Field']?.get(null) == 'val1') { issue.setAssigneeId('user 1') }
but as I understood this method works only in validators.
ok, for JIRA 7 the following works:
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager() CustomField cf = customFieldManager.getCustomFieldObjectByName("Custom Field") Map cfVal = issue.getCustomFieldValue(cf) as Map String value = cfVal.get(null) if (first == 'val1') { issue.setAssignee(ComponentAccessor.getUserManager().getUserByName("user 1")) }
Thanks
I would reccomend to use
issue.setAssignee(ComponentAccessor.getUserManager().getUserByName("user 1"))
imstead issue.setAssigneeId(
'user 1'
)
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.