i have post function in my workflow to clone issue and links on perticular transition.
below code works if custom field is not group picker single value:
def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'summary updated'}
issue.setCustomFieldValue(cf, 'hello')
when i try to updated single value group picker custom field it does not work:
def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Assignment Group'}
issue.setCustomFieldValue(cf, UserManager.getGroup('my_group1'))
i tried below options:
issue.setCustomFieldValue(cf, GroupUtil.getGroup('my_group1'))
issue.setCustomFieldValue(cf, UserUtil.getGroup('my_group1'))
got the solution:
import com.atlassian.crowd.embedded.api.Group
import com.atlassian.jira.ComponentManager
ComponentManager componentManager = ComponentManager.getInstance()
Group watcherGroup = componentManager.getUserUtil().getGroup("test1")
List<Group> groupList = new ArrayList<Group>()
groupList.add(watcherGroup)
def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Assignment Group'}
issue.setCustomFieldValue(cf, groupList)
Should this be able to be put under "Additional Issue Actions" if you use the 'create subtask' built in script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can this be used in the built in transition to create a subtask? Specifically in the "Additional Issue Actions"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes it can be used
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Weird, under 6.2.X it doesn't seem to function properly. If I add that code the 'create a subtask' post-transition fails.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can this be used in the built in transition to create a subtask? Specifically in the "Additional Issue Actions"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.