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

groovy script for cloud

Ananthakumaran February 9, 2024

When i am creating a ticket in the jira cloud, in the issue fields section i have  added a field named Team approvers and it is a multi select options  and in that field when i select any options it should be added in the approvers group after creating the ticket. can anyone solve this issue with necessary script code or any automation rules to get the following result.Screenshot 2024-02-09 175100.png 

1 answer

0 votes
K Vivek Rao February 9, 2024

Hello @Ananthakumaran

 

Here is the approach i followed to achieve this requirement, as per the provided details i understand the fields "Team approver" and "Approver Groups" are multi group picker fields.

instead of issue created, use issue value changed trigger. 

 

I created 2 custom fields 

Team Approver (source) ID 10144

Approver group (destination) ID 10119

 

Configured as below

Screenshot 2024-02-09 at 22.54.12.png


Screenshot 2024-02-09 at 22.56.31.png

This should work.

Ananthakumaran February 10, 2024

Hi, @K Vivek Rao ,

                  This solution doesn't meet my expectations. when i'm Screenshot 2024-02-10 132949.pngupdating the issue, the values in the team approver fields is showing none. Please find the screenshot for reference.

K Vivek Rao February 10, 2024

Hi @Ananthakumaran

 

Could you please share the screen shots of your automation configuration.

Ananthakumaran February 10, 2024

Screenshot 2024-02-10 143817.png 

@K Vivek Rao , Please find the above screenshot for reference

K Vivek Rao February 10, 2024

There is an extra space and gap in your code, could you please check those once and try. compare the code format as per my screen shot and maintain similar pattern

also i hope you are selecting the group names while creating the issue

 

Ananthakumaran February 10, 2024

Let me check 

Ananthakumaran February 10, 2024

It is not working @K Vivek Rao 

 

Ananthakumaran March 5, 2024

Hi @K Vivek Rao i have the same issue now and in team approver i have certain approver(20 approvers) and in the the Approver Groups i have the corresponding Approver groups of 20 team approvers. for example if i have selected security in team approver, it should add Security Approver group to the list and so on. if i select multi team approver the corresponding approver groups should get appended to the list. This is my requirement. can you do something on this or help me with thisScreenshot 2024-03-04 145843.pngScreenshot 2024-03-04 145731.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events