Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation plugin: add two different users into a field.

Hi,

How to automatically add two users into a field of an issue - by using the Jira automation plugin? The field being of type “list of users”.

At present, the automation works well for one user, by using the “Edit issue fields” action and then by updating the given field (the “Add to existing values” box being checked).
I haven’t found a way to add two different users. Creating two “Edit issue fields” actions sequentially doesn’t seem to work (the last user only is added to the list).

 

Screenshot 2020-05-11 at 10.10.38.png

1 answer

1 accepted

0 votes
Answer accepted

Hello @pierre_gendre

Welcome to the Atlassian Community!

Per your description, I understand you are trying to copy all the users in the field "Access request for person" to "Request participants" when an issue is created, however, only the last user added in the "Access request for Person" is copied. Is that correct?

Performing a practical test in my own site, I was able to properly copy ALL the users configuring the same rule you did:

Screen Shot 2020-05-12 at 18.59.59.pngScreen Shot 2020-05-12 at 19.00.20.png

That being said, I suggest checking the following steps to troubleshoot it:

  1. Confirm if the field "Access request for person" is really configured as a User picker (Multiple Users).
  2. Confirm that you have added all the users to the "Access request for person" in the same issue create screen.
  3. Confirm if all the users added to the "Access request for person" are mapped as customers in the service desk project. Only customers can be added as request participants.

Let us know if you have any questions.

Hi Petter,

thank you for your answer. This is not exactly what I am trying to do.
Sorry, if I missed something. Let me explain it more accurately:

An issue of type T gets the following fields:

- name: "Teamlead" type: "User" (custom field)
- name: "Access request for person" type: "User" (custom field)
- name: "Request participants" type: "Set of Users"

The rule I'd like to implement is the following:

As soon as an issue of type T is created,
the "Teamlead" value AND the "Access request for person" value (of the given issue)
should be added into the "Request participants" field.

Best,
Pierre

Hi @Petter Gonçalves ,

Do you have any update on that topic?
Thank you.

Best,
Pierre

Hello @pierre_gendre

Thank you for your detailed information.

Now I understand you are trying to add users from two different custom fields to the "Request participants" field.

Indeed, adding values from two fields to a single one in the same rule will not work as expected, so you must re-fetch the issue before adding the value from the second custom field. Basically, you just need to add a re-fetch action before the second edit issue fields:

Screen Shot 2020-05-18 at 13.16.41.png

Additionally, make sure you have marked the flag to add to existing values.

Let us know if that worked for you.

Hi @Petter Gonçalves ,

It works well!
Thank you,
Best.


Pierre

Like Petter Gonçalves likes this

You are welcome @pierre_gendre

Have a nice day!

Hey @Petter Gonçalves -- I'm not seeing a way to mark the flag to add to existing values for my multi-user picker field.  Can you show where I would set it?  Thanks in advance!

Hello @Bill Latham,

The option to flag a new option without excluding the previous flagged options from a user picker field can be selected if you select to copy the field from another field, as in the example above:

Screen Shot 2020-10-28 at 13.17.44.png

If you plan to add it without copying from other field, you can use the advanced field editing as described in this documentation. In the example below, consider "user.accountid" as the raw account id of the user you would like to add in the field:

{
    "update": {
        "custom user field": [{
                "add": "user.accountid"
                  }]
              }
}

 Let us know if you have any questions.

Thanks -- I was hoping there was a flag somewhere I was missing.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you