Edit Request participants in automation with a list of Asset objects

Mario GELES
Contributor
July 17, 2024

Hi community,

 

I try to set an automation to edit the Request particpants field with a list of users.

So with an AQL request I selected a list of users in asset and I stored it in a variable called {{Participants}}.

The list is OK and the variable works fine.

I used the Edit issue feature to SET Request Participants field with {{Participants}} then I re-fetched the data and again edit issue to SET Request Participants field with {{issue.Request Particpants}} and {{Participants}}. I read somewhere thant it was the way to have multiple users in Request Participants field.

 

Request_Participants_Automation.png

 

My problem is that it doesn't work fine. Sometime I have just one user, sometime two or three. My list for the test contains four users (named A, C, F, P, in the screenshot). 

And when I look at the activity on the ticket I see that the user(s) in the Request Participants field have been change multiple times.

 

Request_Participants_2.png


I have the same problem with Approvers field.

 

Does someone know how to fix this ? 

 

3 answers

1 accepted

0 votes
Answer accepted
Mathis CHAUMETTE August 12, 2024

Hello Mario,

 

I found a solution about your issue : 

Get object with the action block "Search objects", with this action block, you will get the objects in an array. 

Then, you need to create the number of variables required for get individually each Requests Participants like : 

{{FirstParticipant}} with the smart value using lookupObjects.get : 

{{#lookupObjects.get(0)}}{{your_argument}}{{/}}

 

fp.PNG

sp.PNG

 

With the get(0), you will take the first object of the array, with the get(1), you will take the second object of the array, etc...

After that, you can add your request participants with your variables 

lp.PNG

 

 

Mario GELES
Contributor
August 12, 2024

It works ! Thank you so much ! 

0 votes
Adolfo Casari
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.
July 17, 2024

Taking this as a clue:

https://community.atlassian.com/t5/Jira-Service-Management/I-don-t-want-people-CCd-on-emails-to-be-automatically-added-to/qaq-p/2755451

I would edit the request participans using the json that you can build from the AQL results.

Mario GELES
Contributor
July 18, 2024

Hi @Adolfo Casari  

Thank you for this suggestion.

I tried to do this but I am not really good at Json.

Here the Json I made : 

{
"update": {
"Request participants": [{
"add":{
{{Participants}}
}
}]
}
}

And I also tried like this : 

{
"update": {
"Request participants": [{
"add":{
"{{Participants}}"
}
}]
}
}

 

But my Json is not correct 

0 votes
Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 17, 2024

Hi @Mario GELES ,

Can you explain your case/scenario. i.e. on what conditions, the Request participants field needs to be updated with what users in it. 

Mario GELES
Contributor
July 17, 2024

Hi @Rilwan Ahmed 

This automation purpose is to send an email with a quotation that some users should then approuve or sign.

The quotation is an attachement of the ticket. The users are internals client. Attachements send by email can't be seen or download by clients unless they are in the Request Participants field.

So when a ticket is open my automation search in Asset what is the city of the reporter then it search all user with attribute "Signataires" from this city and finally store them in the variable {{Participants}}.

And I use this variable to edit the Request Participants field.

Suggest an answer

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

Atlassian Community Events