Hi,
i am currently working on an automation that automatically adds request participants to the trigger issue.
The trigger issue is an ITSM request via the portal. When the request is created the automation looks up related issues in a JIRA project and sends notifications to the user selected in the field "Asset Owner". So fine so good.
Now i want the users in the field "Asset Owner" to be automatically added as request participants to the trigger issue. How do i have to edit my current automation? (See image). Thx in advance.
You could use the Edit Work Item action with a dynamic JSON expression to add more Request Participants. For some additional details:
Your final expression will likely look like this, where customfield_12345 is the Request Participants and customfield_67890 is your "Asset Owner":
{
"update": {
"customfield_12345": [
{{#triggerIssue.customfield_67890.value}}
{
"add": {
"id": "{{.}}"
}
} {{^last}}, {{/}}
{{/}}
]
}
}
Kind regards,
Bill
Kind of I had feeling you will look Here. It looks like Automations summoning you 🤠😅
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, thanks for your answer.
I have a question: According to the JSON expression the participants field would get updated with the value of the field of the trigger issue..right?
Maybe i am misunderstanding this but i wanted the participants field to be updated with the asset owner field values. The asset owner field is not in the trigger issue (ITSM request) but in the "Look-Up" Jira issue in the other project.
Thx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My example was from the trigger issue / work item, and you could certainly use another source...such as from a lookup, branching, etc.
I recommend testing to confirm you get what you want:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
thanks. But honestly i don't know exactly what to do. May i ask you to sent me a screenshot of a "Test" automation you build that does exactly what i want? I fear that it is a bit too complicated without actually seeing it...
Especially the last step "update" is confusing to me.
In the image you can see what i currently created in the rule. Thank you very much. Much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) Which work item are you trying to update: the trigger one or something else?
2) Which work item is the source of custom field to update the target work item to update (from question #1 above)?
Let's assume you want to update the trigger work item and get the source data from another one. In that case, the rule would not use branching. Instead, use the Lookup Work Items action with a JQL expression to find the source data, and then build the JSON to update the trigger work item with a Edit Work Item action.
And, please carefully re-read my first post in this thread: you are using the Work Item Create trigger, and because that has racetrack timing problems:
Thus, the rule outline could be:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Marcel Jünge
First please specify, Which field Type are your ” Assets Owner "?
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.
@Bill Sheboy already provided you good answer.
What you should remember branches on multiple issues run separately, so you shouldn't use branch to build the participant list on the request.
Keep the email inside the branch, but add the Request participants update outside the branch on the trigger issue.
Take advices from @Bill Sheboy and play a little with that.
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.