The requirement: I am trying to create an Automation rule that will automatically create issue under an Epic when the Epic is created. I want to create an identical set of issues for 1..n Assignees.
The target project type is Company Managed Software. I am on a Free subscription.
For testing purposes I have set the rule trigger to be Manual rather than triggering by Epic creation, and I'm creating just one issue. I'm using two users for the test.
I created a Variable in the Automation rule to create a comma separated list of Account IDs.
I'm using a Smart Value branch to iterate over that Variable.
In the branch I create the issue and set the Assignee as part of the Create Issue action.
The problem is that the Assignee is not changing from one iteration of the branch to the next. All created issues end up with the same Assignee.
I have tried setting the Assignee by selecting the Assignee field to set and setting it to the branch smart value, and by using JSON in the Advanced Editing option.
I got the account IDs by looking up the users through the Team feature and pulling the IDs from the URL. I have double checked that the IDs are correct.
I have tried swapping the order of the IDs in the Variable. In both cases the user is set to user 53...a0, regardless of whether it is first or second in the variable.
I have confirmed that both the users I've specified in the variable can be manually assigned to issues in the target project. There is no automatic setting of Assignee for the project via a Default Assignee setting nor are Components being used.
I am writing the branch variable into the Description field also so that I can confirm which value is in focus of the branch when the issue is created.
I have checked the History entries for the issues. The Assignee is not being modified after the Creation is completed.
Below is my rule, details of the steps, and the output of the rule execution.
Any idea why the Assignee is not being set as expected? Thanks in advance!
I have not been able to recreate that symptom.
Instead, my test rule was able to successfully assign the issues during issue create (with same project / type as trigger) using either the branch variable directly in the Assignee field or with JSON. This also worked for Epics and Story level issues, and with different rule triggers (e.g., Scheduled and Manual)
Kind regards,
Bill
Thank you for trying this out, @Bill Sheboy
The actor for the rule is "Automation for Jira".
I updated the Create Issue action to remove the JSON and set the Assignee field directly with a Smart value.
The JSON shown is just the default text shown when you open that dialog and haven't entered your own code yet.
I ran the rule again and the result was the same; all issues assigned to the 53...a0 user though the Description field shows a different account ID for one of the issues.
I recreated the rule from scratch. Same result on the new rule.
When you tried to recreate this, did you enter your comma separated values directly in the Create Variable action? I notice that it says that a smart value is supposed to be used. I'm not sure that I've ever tried to directly enter a value for the variable rather than referring to a smart value elsewhere that held the value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I just copy-and-pasted in the values as that is a technique to hard-code values in rules using variables.
Hmmm...your audit log clearly shows there are no leading / trailing spaces for the values that could break the assignment.
If you look at the issue history for the created issues, is anything else perhaps re-assigning the issues?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only entry in the History tab for each issue is the entry noting it was created by Automation for Jira.
I love these problems where it seems that people are doing the exact same thing, and yet it works for one and not the other. :-D
I'm open to other suggestions to accomplish this.
I started exploring this because of another post that I was trying to answer:
Maybe the solution would work for that user, and my failure is a weird one-off.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried with a default assignee for the project to see if there was an edge case here.
I'm stumped why this is different for your rule, unless there is some intermittent problem happening in the rules engine for advanced branch. When that feature was first introduced, there were cases where it would not loop over all values when certain actions were used inside the branch (e.g., create variable). That was fixed a couple of years ago.
Have you tried using your super, community leader powers to ping the Atlassian team and see what they say? :^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not yet. I wanted to reach out to the community first, in case I was missing something that would be obvious to somebody else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried it on my free instance and was not able to reproduce it either. It created the issues correctly with two different users based on the initial userList variable.
I assume if you manually create an issue it will not set the assignee if you leave it unassigned correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, bother!
When I manually create an issue in the project and leave the Assignee field set to "Automatic" it is assigning the issue to the same user.
Initially that didn't make sense. There are no Components set for the issue, and at the Project level the Default Assignee is "Unassigned". And then I looked at the Create transition in the Workflow, and found that a Post function is setting the Assignee.
Thank you everybody for your help!!
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.