Forums

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

Use lookupissues to then clone those issues and their sub-tasks

Jenn Sherman
Contributor
February 7, 2023

When a sprint is created, I want a set of recurring stories to be put in the sprint.  Is there a way to use lookupissues to find the issues with labels=mktgweekly and then clone each of the issues and their sub-tasks? Here's what I've tried. I get the error below when enabling the rule.

lookupissues.pnglookupissues2.pnglookupissues3.png 

I had originally tried to get the stories & sub-tasks replicated by putting them in an epic and using a for "epic link" = 12345 branch with Clone as the action inside.  This cause the stories to be cloned but not the sub-tasks.  I was hoping lookupissues might allow me to clone with the sub-tasks.

 

1 answer

1 accepted

2 votes
Answer accepted
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.
February 7, 2023

Hi @Jenn Sherman 

Before dealing with the error...

Your lookup issues seems to span lots of issues.  Would it help to narrow that list's JQL down a bit so it doesn't get more and more issues, each time the rule runs?

Next, how many recurring stories/subtasks are you trying to create? If this is a smaller set consider creating them directly in the rule rather than using cloning.  This will reduce the chance of problems as the logic needed to copy both the stories and subtasks is more complex and may require multiple chained rule execution.

Back to the error message...That error is explaining the cause, although perhaps a bit vaguely as it doesn't point to where the problem is  :^)

Your advanced branch contains a Clone action, and clone requires an issue to be in scope...but instead the branch only provides a key.  Two possible solutions are...

  • change the advanced branch source to be {{lookupIssues}} and you will be branching over the entire issue data, not just the key
  • change to use a branch on JQL using key IN ( {{#lookupIssues}}{{key}}{{^last}},{{/}}{{/}} )

After that your Clone will have an issue to proceed.

Kind regards,
Bill

Jenn Sherman
Contributor
February 10, 2023

Thanks!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events