Hi all
Just wanted to share my solution for pulling approvers from groups into an approver field for use within Jira Service Management.
It involves Automation for Jira. The method you'll be using is a rule that sends a web request to Jira itself, to pull the members of a group, you can either set the web request with a specific group OR, a very cool part, is that it accepts smart values, so you can have a group picker field with a prefilled value in the form itself and the rule will pull the members of the group you've set in the prefilled value of the group picker field.
You'll need to generate a bearer token to use, or use basic auth if desired.
The url for the web request is as follows
To use a smart value from a group picker field with a preset value in the form
https://YOUR_JIRA_BASEURL/rest/api/2/group/member?groupname={{customfield_xxxxx}}
or if you just want to have a load of if/else blocks to have the group that's chosen be dependent on what's selected in a custom field for example
https://YOUR_JIRA_BASEURL/rest/api/2/group/member?groupname=NAME_OF_GROUP
Icons that showed faces removed, but here's an example of a ticket pulling the members
We currently have self service on our portal forms to ask approval of the user in the 'Managed by' attribute in Active Directory for Security Groups and Distribution lists by syncing the groups as Insight objects via an LDAP sync. What we've found recently, is that teams have required additional approvers on these requests automatically in case someone is OOO. A way round this, is for the additional users to be set in one of the extensionAttribute's in Active Directory, and synced to a Jira User attribute against the Security Group or Distribution List object within Insight.
The format for inputting these values in Active Directory is username1||username2||username3
We've combined our new attribute 'Additional Approvers', with our 'Owner' attribute and used Insight's own automation to combine the two values into a new Insight attribute called Approvers, couple with a post function on the workflow to pull the values of this attribute, we are able to populate a user picker field for Jira Service Management approvals with both the owner of the group and the additional approvers.
Great! So I wanted to add to this for anyone that is trying to pull in Active Directory group users into their JSM Approver People Picker fields.
I created my "Bearer" token using Jira Personal Access Token (PAC) creator under a Service account's profile in Jira.
I then followed method 1. However I had to modify the Webhook body from "Issue Data" to Custom data.
In the Custom Data Field I put : group
I then also referenced my AD group name directly in the Webhook URL:
https://YOUR_JIRA_BASEURL/rest/api/2/group/member?groupname=AD_GROUP_NAME_HERE
This is a HUGE find as now I can maintain list of people inside of AD like I do for everything else and keep majority of static people list out of Jira.
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.