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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,541
Community Members
 
Community Events
176
Community Groups

How to wait for an action to complete before progressing?

I have an action to clone issues from one project to another when they move into a specific column. We use this to allow us to have a "triage" project and have a small group of people decide whether requests are rejected or taken forward and if they are taken forward where to route them.

For the most part this works well, but if a person is assigned to one of the issues in the first project, when the Jira automation tries to clone the ticket the automation fails, saying that it can't assign the issue to that person in the second project (presumably because they aren't a member of that second project):

Clone issue
Error creating issue
User 'theirusernamehere' cannot be assigned issues. (assignee)

Adding them to the second project isn't really a good option for us, so I added an action at the top of the automation to unassign the ticket before it does the clone. That action is carried out without error, but the automation still fails with the same error when it reaches the clone step. When I look at the original issue it has been unassigned so it looks to me like a race condition where the unassigning is happening too slowly.

Is my assumption correct? If so, is there any way to force the automation steps to happen in series rather than running in parallel or failing that introduce a long wait before the clone?

2 answers

2 accepted

1 vote
Answer accepted

Hi @Sam Prince -- Welcome to the Atlassian Community!

If you are doing the un-assignment followed by the clone in the same rule, the problem is the clone is still using the state/data of the trigger issue at rule load time, and not after the edit.  The fix for this is to use a re-fetch action to reload the data before the clone.  For example:

  • ...
  • action: edit issue to clear assignee
  • action: re-fetch
  • action: clone issue
  • ...

Kind regards,
Bill

Thanks @Bill Sheboy,  that certainly explains why I saw the behaviour I did. It's useful to understand the underlying model and the fix is very straightforward to implement.

Like Bill Sheboy likes this

Hi, Sam.

I am glad to learn that helped.  For future reference, the next most likely cause of this symptom is confusion over what {{issue}} means at different points in a rule...as context is important.

For example in this rule where issue ABC-123 has a parent of ABC-456

  • trigger: some trigger...from issue ABC-123
  • ... at this point, both {{issue}} and {{triggerIssue}} refer to ABC-123
  • branch: on parent epic
    • ...at this point, {{issue}} refers to ABC-456 and {{triggerIssue}} refers to ABC-123
  • ... at this point, both {{issue}} and {{triggerIssue}} refer to ABC-123

And so actions like Clone Issue could have different behaviors/errors based on what {{issue}} is.

Such cases are a good reason to post an image of your rule and audit log with questions; they provide lots of context.

Kind regards,
Bill

Like Sam Prince likes this
1 vote
Answer accepted

Hi @Sam Prince and welcome to the community!

In your clone action, try adding the assignee field and hard setting it to "Unassigned"

Thanks for the quick reply Mark - I've given that a go and will test it shortly.

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events