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.
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.
I have the same problem with Approvers field.
Does someone know how to fix this ?
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}}{{/}}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Taking this as a clue:
I would edit the request participans using the json that you can build from the AQL results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.