Hi everyone,
I am investigating an issue in Jira Service Management Cloud related to populating the Request participants field from a text field containing multiple email addresses separated by commas.
I was able to reproduce the behavior in a test environment and isolate the issue.
The automation flow is:
Request body:
{ "accountIds": [ "{{webResponse.body.first.accountId}}" ] }
The issue is that when multiple emails are processed, only one participant remains in Request participants, even though both GET requests return valid users and both POST requests return HTTP 200.
I also tested storing the accountId in a variable inside the branch:
accountIdParticipante = {{webResponse.body.first.accountId}}
Then I used:
{ "accountIds": [ "{{accountIdParticipante}}" ] }
In this case, each branch preserved the correct accountId, but the final result still contained only one participant.
As a comparison, I tested a single POST request with multiple fixed accountIds:
{ "accountIds": [ "accountId1", "accountId2" ] }
This worked correctly.
HTTP 200 was returned, the response showed size=2, and both participants were successfully added to Request participants.
Because of this, my current hypothesis is that the issue is related to parallel execution of Advanced Branch iterations, where multiple updates to the same request may interfere with each other.
I also tested using an auxiliary text field to accumulate the accountIds before performing a single POST request, but the updates inside the branch were still inconsistent.
Has anyone successfully implemented a similar scenario?
I am mainly looking for guidance on:
Any examples or guidance would be greatly appreciated.
Thanks!
Community moderators have prevented the ability to post new answers.
Hello!
Here is a link to a documented solution:
In other words, keep the advanced branch so it loops through each user to get the email address, and use the advanced JSON within the edit work item action to just add the user incrementally (currently based on what you are experiencing, it is being set instead of just updated/added):
{"update": { "Request participants": [ { "add": {"id":"<accountId>"} } ] } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.