How to add a user into "User Picker (multiple users)" with Workflow Post Function?

Juho Itä July 21, 2022

Hi,

I've got a Custom Field called Allow Users. I'd like to add users into it via Post Function in Workflow. Adding current user with variable %%CURRENT_USER%% works, but I don't know what is the syntax to add other users.

how_to_add_user_via_custom_field_post_function.png

I've tried to add user accountId like "12k23421ll232" from URL https://admin.atlassian.com/s/instanceID/users/12k23421ll232

Separated with space, comma, semicolon, new line.

There's error Unable to update custom field customfield_10045 - Allow Users in issue [DIT-56]. when I try to transition the issue when the syntax is wrong.

Does somebody know the syntax?

Cheers,
Juho

1 answer

1 accepted

0 votes
Answer accepted
Juho Itä August 2, 2022

I noticed that adding multiple users separated with comman and space ", " in one function works, but if I try to append a user into the field it fails.

If the field is empty before the post function is run, this works:
Post Functions:

  1. The value 61b3564f9615eb00xxxxxxxx, 62710faf6a383700yyyyyyyy will be appended to field Allow Users, or set if it is a multi field

Appending gives error:
Post Functions:

  1. The value 61b3564f9615eb00xxxxxxxx, 62710faf6a383700yyyyyyyy will be appended to field Allow Users, or set if it is a multi field.
  2. The value 6123464f9615eb00wwwwwwww will be appended to field Allow Users, or set if it is a multi field.


This is actually a reported bug and Atlassian has closed the ticket without resolving it.

https://jira.atlassian.com/browse/JRACLOUD-71023

I worked around the issue with Automation.

philipf
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.
May 9, 2024

that sucks, I am having the same problem, and hate to hve my workflow complete accept for this one key piece.

Adding an automation when I have a workflow is silly. 

Suggest an answer

Log in or Sign up to answer