Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate creation of issues based on a custom assignee list

LENA BURLAK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 8, 2024

We would like to create issues automatically based on a certain list of users and assign it to them. 

Based on some internet ideas we've Created a smart value list in automation

{{AissgneeList}} as {{"User1,User2"}}, the users are hardcoded for now for testing purposes, also not sure how to get project or group user's list for automation.

After that we are creating a branch based on AssigneeList.split(",") with variable Person in two steps 

1. Create an issue and

2. Assign issue to variable {{Person}}

 

The automation creates only two issues, not 4, and does not assign the issues to users. 

Any help to what is possible to do?

automation2.jpgautomation1.jpg

1 answer

1 vote
Bill Sheboy
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.
September 8, 2024

Hi @LENA BURLAK -- Welcome to the Atlassian Community!

Your rule will need some changes to work with a user list...

First, I do not believe Jira Cloud automation rules can use the user's display name to assign issues.  Instead the account id value must be used.  There are several ways to solve this:

  • Include the account id value in the rule
    • As you are already hard-coding the display names, you could substitute the account id values, or use a Lookup Table so both values are present in the rule.  For example, with some made up account id values:
      • action: Create Lookup Table
        • variable name: tblAssigneeList
          • row
            • key: Jane Doe
            • value: 12345-abcd
          • -ow
            • key: John Doe
            • value: 67890-efab
    • This approach will help you get your rule set up quickly and it may be improved to another method next
    • One risk with this approach is typographic entry errors and the maintenance for changes to either value (or the list)
  • Assume there exists at least one issue already assigned to each person, and...
    • Use the Lookup Issues action with JQL to search on the display name for a matching assignee issue, and then use the accountId attribute for that issue in the new Story assignment
  • Dynamically get the account id value using the REST API
    • Use the Send Web Request action to get / search for the user, and use their account id value from the {{webResponse}} smart value in the assignment

 

Next, I recommend adding a prefix to the names of variables (e.g., created or in a branch), such as with varPerson.  This will reduce the risk of collisions with built-in smart value names.

 

Next, to create a list for the branch looping, the curly brackets and quotation marks are not needed.  In your example it might look like this:

  • action: create variable
    • variable name: varAssigneeList
    • smart value:
Jane Doe, John Doe

Please note well the use of a comma followed by a space as a delimiter.  This helps make the list more readable, and must be accounted for in the branch:

  • advanced branch: 
    • smart value: {{varAssigneeList.split(", ")}}
    • variable name: varPerson

The alternative is to change the delimiter between names to only be a comma (or use the Lookup Table mentioned earlier).

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events