I have created a Group Picker field and added the field to project screen and request type. The field is of global context, there is no context set for projects and issuetypes.
When I try to use that field in approval configuration in a workflow the field is not available in the list.
I can see below pop up on the screen when I click on info icon.
Does this mean only User Picker field is available for approvals ?
How can I make sure that I select group picker custom field in the add approval configuration in the workflow?
Hi @Sushmitha ,
It support user picker field only. If you want it based on group then you need to create a custom script post function then add a script.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
def groupManager ComponentAccessor.getGroupManager()
def customFieldManager ComponentAccessor.getCustomFieldManager()
def group groupManager.getGroup("CIS-GG-JIRA-ROM-APPR-FASTPASS") // get the CIS-GG-JIRA-ROM-APPR-FASTPASS group def usersInGroup groupManager.getUsersInGroup (group) // get the users in that group
def listOfApproversL1 customFieldManager.getCustomFieldObject("customfield 30501") // get the List of Approvers Level 1 custom field
listOfApproversli.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(listOfApproversL1), usersInGroup), new DefaultIssueChangeHolder()) //update List of Approvers Level 1 with user
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.