JIRA automation sees users as inactive and cannot assign issues to them

TP April 10, 2023

Hello,

 

I am loading the list of members of a group, then creating one issue for each of them through automation.

Screenshot 2023-04-11 at 9.55.34 AM.png

 

Next step is creating the variable

Screenshot 2023-04-11 at 9.59.39 AM.png

I then loop through it with

 

Screenshot 2023-04-11 at 10.00.54 AM.png

And within the branches I create the task using

Screenshot 2023-04-11 at 10.01.43 AM.png

And the result is below:

Screenshot 2023-04-11 at 10.02.50 AM.png

with the audit log as below

Screenshot 2023-04-11 at 10.05.17 AM.png

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)

2 answers

1 accepted

3 votes
Answer accepted
Gideon Nolte [Jodocus]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2023

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.

0 votes
Gideon Nolte [Jodocus]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2023

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 :)

TP April 11, 2023

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

Gideon Nolte [Jodocus]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2023

Hi @TP ,

glad to hear my rambling was actually useful :)

TP April 11, 2023

Still surprising behaviour in my initial tryout but I don't have the courage to file a bug !

Gideon Nolte [Jodocus]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2023

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

TP April 11, 2023

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! 

Suggest an answer

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

Atlassian Community Events