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:
- A text field receives multiple email addresses separated by commas.
- An Advanced Branch iterates over the values using a smart value similar to:{{issue.FIELD_NAME.replace(" ","").split(",")}}
- For each email, the automation calls:
GET /rest/api/3/user/search?query={{emailParticipante.urlEncode}} - The request returns HTTP 200 and a valid accountId.
- The automation then calls:
POST /rest/servicedeskapi/request/{{issue.key}}/participant
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:
- How to reliably resolve multiple email addresses into accountIds and then perform one single POST.
- Whether an Advanced Branch can be processed sequentially.
- Whether there is a recommended way to collect values from multiple branch iterations.
- Whether using two chained automation rules would be a better approach.
- Whether there is any known limitation involving webResponse, variables, or updates performed inside parallel branches.
Any examples or guidance would be greatly appreciated.
Thanks!