Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set automatic approvers in JSM from an Insight Object Custom Field

Hi Community,

In this tutorial we will show you how you can automatically set approvers from an insight object's custom field selection using Insight Management and Jira Automation.

 

 

Automation Rule:

Automation Rule.png

 

Advanced Editing Snippet:

{
"update": {
"Approvers": [{
"add": {
"accountId": "{{issue.customfield_id.(Insight Attribute Name)}}"
}
}]
}
}

 

Regards,

Fabian

5 comments

Gary Blower (Clearvision)
Contributor
May 19, 2022

Can you not just add this smart value to the approvers field rather than use the "advanced" JSON?  {{issue.<insight-custom-field>.<user-attribute>.accoundid}}

Like # people like this
Frederic Wolf
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 2022

Hi,

thank you @Fabian Lim  and @Gary Blower (Clearvision)  I am currently working on the exact same issue and you pushed me into the right direction.

After a few tries I have the following results. You can change the Trigger to issue creation, but for testing the manually triggered is much more convinient 

1. Example: Insight Field only contains 1 User

This works like @Gary Blower (Clearvision)  suggested

access_ONE.JPG

{{issue.customfield_10093.Manager.accountId}}

2. Example: Insight Field contains multiple Users

This example took some investigations, but finally i have the following solution.

access_multiple.JPG

{
"fields": {
"Approvers": {{customfield_10093.Manager.flatten.asJsonObjectArray("accountId")}}
}
}

 

The Portal will only have the application and description. The Summary is set to a fixed value.

The summary is to be automatically supplemented in the future with the selected application.

Like Fabian Lim likes this
Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2022

I want to automatically add a reporter as  a approval, but there is no option to add a reporter can I get any smartvalue?

Frederic Wolf
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2023

Hi @Muhammad Moazzam Hassan ,

you can use the smart value {{issue.reporter}} .

to learn more about smart values. Have a look here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

if this helped let me know. If u need futher advice, explain the use case in more detail. 

Chand Bhardwaj
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 7, 2023

Hi, How can I add both manager (from Insight) & reporter as approvers?

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events