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

Edit Request Participant field with Asset values

Mario GELES April 17, 2024

Hi community, 

I want to edit the field Request Participant with some values from Asset. 

I have done a lookupObjects and insert the values in a variable.

The values are the Name Attribute (called "Nom") of the object witch is in "Users" objectType.

This attribute type is "Text" and not "User".

The Audit log action confirms that values are correct (First name and last name).

The rule status is succed.

However the Request Particpant field is still empty.

 Request_Particpant_Automation.png

Request_Participant_variable.png

Request_Participant_edit.png

I tried with an attribute of type "User" and it doesn't work either.

I checked the "Request Participant" field with a copy paste of the values and the user is found. but I noticed that in order to update the field I have to click on the user otherwise the field stay empty. Maybe that's the problem with my automation. 

Could someone help me with this ? 

3 answers

1 accepted

0 votes
Answer accepted
Mario GELES April 18, 2024

I've found the solution (Indeed the name attribute was not good but the email attribute works) :

Request_Participant_Solution.png

Juste after the lookupObject where there is the AQL to find data in Asset, I made an advanced branch. 
The smart value is {{#lookupObjects.distinct}}{{write here the name of the mail attribute}}{{/}}
{{#lookupObjects}}{{/}} allow to use a list of datas from asset

.distinct allow to split data in different values

Then edit issue standard mode (not JSON) and use the variable + this smartvalue {{issue.Request Participants}} in order to keep values existing in the Request participant field.

Then re-fetch data

Then edit issue again standard mode and use the variable + the smartvalue {{issue.Request Participants}}

0 votes
Mario GELES April 17, 2024

I tried to edit "Request Participants" in the custom way using JSON instead of the standard way.

Request_Participant_JSON1.png

I tried this JSON for a list of one user : 

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

The status rule is succeed, the rule's audit log says that the field had been edited but in my issue the field appears empty. 
Of course the field is in my edit and view screens.

Ben Alderton April 17, 2024

Hello Mario,

I would recommend the value of a Jira account id or a customer email address using the "id" field. I was unable to get "name" to work.

image.png
You may need to add a "Re-Fetch" component after creating the variable to ensure the edit component isn't pulling a null value from {{Participants}}.

I was unable to modify the request participants with update, but I was able to do it with "fields"(set)


image.png

This can be accomplished with a lookup table too, or multiple values.

image.png
image.png

Mario GELES April 18, 2024

Hi Ben, 

I don't understand what is the  "id" field you are speaking of. 

Since Jira and Asset don't use the same Id's

The table idea seems great but I don't know how to split my datas wich are in a variable in the different lines of the table. 

0 votes
Ben Alderton April 17, 2024

Hello Mario.

My understanding of the "request participants" field is that it requires an accountID/username to be set in automation. If your {{Participants}} value is "FirstName LastName", then the automation is unable to match that to an account id. If the participants are portal-only customers, I believe you should be able to set them using their username/email address. If they are a service desk customer, you will need to locate their account ID within Jira.

Suggest an answer

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

Atlassian Community Events