automation rule - copy reporter to be assignee of sub task created

eric caprio September 24, 2024

I have an automated flow for when a sub-task Code Review is automatically completed through another automation of Pull Requst Merged. Details below and screenshots - Problem: the copy of reported in the parent task is not making it to the new sub-task QA

- it closes the sub-task code review and creates a sub-task QA

- moves along parent story to QA

- supposed to assign the reporter from parent task to be the assignee of the new sub-task QA

screencapture-darwin-cx-atlassian-net-jira-settings-automation-2024-09-24-16_03_34.png

3 answers

1 vote
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

It looks like you are approaching it correctly, I tested it on my cloud instance and that works as expected.  If it just won't work for you, try one of these other approaches.  I have heard of some race conditions, where sometimes the child doesn't know it's parent in this case, and that putting a delay in the automation would address this, however, I have not personally run into that.

You could use the Clone Issue step and only select the reporter field.  However if the first approach isn't working, I would be skeptical that this wouldn't have the same issue.

Or create a new Automation that triggers off the creation of your subtask QA, then it checks the reporter field and updates it if incorrect. This would avoid any issue with the subtask not understanding it's parent yet.

 

eric caprio September 25, 2024

Thank you Shawn, I will attempt adding another automation rule to check reporter field and updates. 

0 votes
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 30, 2024

Hi @eric caprio 

The suggestion from @Shawn Doyle - ReleaseTEAM seems correct about the racetrack problem, and I hypothesize because the rule uses the Create Issue action (rather than the simpler Create Sub-tasks action), there is a logic error in the rule engine whereby the parent field is not always set before the relative lookup from the Reporter field is used to set the Assignee.

The fix for that is to change the rule in one of two ways:

  • change the Issue Create set of the Assignee to use the smart value, {{triggerIssue.Reporter.accountId}}
  • do not assign the issue when it is created, and instead:
    • immediately follow the action with a branch to the most recently created issue
    • and assign it to the Reporter from the trigger issue

I recommend trying the first approach to avoid further rule, timing problems.

Kind regards,
Bill

eric caprio September 30, 2024

thanks @Bill Sheboy , I have updated the rule and will let you know:

Screenshot 2024-09-30 at 10.56.09 PM.png

Like Bill Sheboy likes this
0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

Hello @eric caprio 

What is the information that you get in the rule execution log when the rule runs and the subtask is created?

eric caprio September 25, 2024

Action details:


Transition issue
Transitioned issues to
QA


Edit issue
Issues edited successfully
INV-718


Create issue
Can't find issue to copy from
assignee
Issues created successfully
INV-794


Issue condition
The following issues did not match the condition:
INV-794


The following issues passed:
INV-791

Transition issue
Transitioned issues to
Done

Associated items:
Pull request merged
INV-718,
INV-718:marketing campaign preview information
Create issue
INV-794
Branch rule / related issues
INV-791,
INV-794

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2024

To what value is the Assignee field in the subtask being set?

Is the Reporter of the parent issue among the users that have the Assignable User permission in the project? 

Who is the actor of the rule? Does the actor of the rule have the Assign Issues permission in the project?

eric caprio September 25, 2024

Assignee is being set to "Copy from Reporter from Parent Issue".

 

Yes, reporter has same permissions - I can go assign them manually after the case.

 

Actor of the rule is the below:

Screenshot 2024-09-25 at 12.00.16 PM.png

I have tried out the other response solution of another automation rule that when a sub-task QA is created, if assignee is empty, set assginee as Copy from Reporter from Parent Issue

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2024

I was unclear with my first question. What I meant was, what is the actual value that you end up seeing in the sub-task Assignee field after this rule completes?

eric caprio September 25, 2024

it is set to unassigned. Which I assume is empty.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2024

Did the solution of a second rule work for you?

I think @Shawn Doyle - ReleaseTEAM is on track by saying there might be a race condition.

eric caprio September 30, 2024

@Trudy Claspill it has not (FYI @Shawn Doyle - ReleaseTEAM ). Below are the results I am getting, which has me stumped on why it isn't working.

This is from the main rule trying to copy it during PR merge. I did just make one new change to take from parent from trigger issue vs. current issue... just something to try

Screenshot 2024-09-30 at 8.36.01 AM.png

Result of sub task below with no assignee

Screenshot 2024-09-30 at 8.42.05 AM.png

Then I made this new one for update, but it didn't even get picked up from the above - which had a result of an unassigned sub task QA

Screenshot 2024-09-30 at 8.40.03 AM.png

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events