Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Group Picker Custom Field doesn't show up in workflow approval configuration page.

Sushmitha
Contributor
July 6, 2023

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.

approve.PNGDoes 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?

1 answer

0 votes
Manoj Gangwar
Community Champion
July 6, 2023

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

Suggest an answer

Log in or Sign up to answer