Hello,
I am loading the list of members of a group, then creating one issue for each of them through automation.
Next step is creating the variable
I then loop through it with
And within the branches I create the task using
And the result is below:
with the audit log as below
As you can see it has worked as expected except for the assignments where it has only been successful for one user (cf inactive user warning in the audit log). I have checked the result payload and all users are marked as active and I know for a fact that the accounts are all actively used daily.
Any idea why this is happening or how I should change the way I process the list ?
EDIT: I have tried with several groups and the last member is always the one which is correctly processed (last = highest issue key PAR-213 in my example)
Rather than using a custom variable with {{webResponse.body.values.accountId}} to split and loop over, use {{webResponse.body.values.accountId}} to directly loop over the IDs.
Hi @TP
that's some strange behavior. It's just a guess, but do all users have the "Assignable User" permission in the Partnership project? For a fact, all users provided by the REST Call should be active by default, since you do not provide ?includeInactiveUsers=true.
Greetings
Gideon
P.S.: If you get this up and running initially, keep in mind, that there is a default limit of 50 users that will be returned by the REST Call. Furthermore you should be able to use an advanced branch over {{webResponse.body.values.accountId}} directly, but I'm not entirely sure. Alternatively, looping over {{webResponse.body.values}} and binding each to {{developer}} should give you access to {{developer.displayName}}, {{developer.accountId}} and {{developer.active}} inside the branch. This way you could check whether {{developer.active}} is actually true... Just a few thoughts :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assignable User is "Application access" for this project. There is no permission difference between the user for which it works and the others.
"Furthermore you should be able to use an advanced branch over {{webResponse.body.values.accountId}}" -> this solved it ! Thank you very much.
If you want to post it as a single answer, I'll accept it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @TP ,
glad to hear my rambling was actually useful :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the problem stems from splitting on "," rather than ", " which is the joining sequence.
Given the string of "id1, id2, id3"
Splitting on "," produces ["id1" , " id2" , " id3"] producing one valid id ("id1") and n invalid ids with a trailing space. Splitting on ", " or calling .trim() on each element of the list should solve this as well. But as said, iterating over the original data is safer and less error prone than joining the values to a string which is then splitted again to iterate over.
Hope this clears it up.
Greetings
Gideon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tested for this by outputting the string in description but it must trim it automatically there because there was no extra space.
Good catch!
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.