Forums

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

Using Smart value when cloning

Michael Da Costa
Contributor
March 8, 2023

Hi, I am looking to clone epic, task, subtask to a new project - i have this working successfully (with help from this forum - TY)

However when the tasks clone the parent link is not maintained and hence they clone as orphans in my new project.

I have used a smart value to hold parent.key value but this does not seem to be applied to my tasks. Any idea what i'm missing / doing wrong. Apologies i'm a bit of a newbie

My Rule:

clone1.png

 

Clone component: 
 clone.png

2 answers

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.
March 8, 2023

Hi @Michael Da Costa 

Without seeing your entire rule, I suspect this is caused by your branches.  Please consider posting an image of your entire rule and the audit log details, as that will help confirm that.  Thanks!

Until then...some information to help:

Stuff that happens in a branch, stays in the branch.  More specifically, branches on one-and-only-one-issue run "in-line", as if there was no branch.  Branches that could be on more than one issue/thing run asynchronously and in parallel.  There is no guarantee of when the branch will finish...right up to the last step of the rule!

What this means is that if you created that variable to hold the new epic's key inside of a branch on more than one issue, the variable will not be available outside of the branch...even on the next branch loop.

But...if you created it in a branch on one issue, there is a work-around that may work, like this:

  • ...some rule steps
  • action: create variable, just to initialize it
    • variable name: varEpic
    • smart value: none
  • action: create the epic (such as with cloning)
  • branch: on last created issue (note this is a one-and-only-one-issue branch)
    • action: create variable again, with the same name
      • variable name: varEpic
      • smart value: {{issue.key}}
  • now the variable has what you need

 

If you post the image of your rule, the community can try to help.

 

Kind regards,
Bill

Michael Da Costa
Contributor
March 13, 2023

Hey @Bill Sheboy apologies for the delayed reply. You're correct the issue was with the branches i was not aware that variables were specific to a particular branch.

Thanks for the above - v helpful. Your work-around has provided me with what i need to resolve the issue

Thank you very much

Like # people like this
Mark Schofield
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!
October 26, 2023

I confirm this worked for me, thanks Bill!

Here is an example of mine to illustrate

1.png

2.png

0 votes
Jimmy Seddon
Community Champion
March 8, 2023

Hey @Michael Da Costa,

I'm not 100% sure why it isn't working for you.  But my best recommendation as a first troubleshooting step would be to add a log action step:

LogAction.JPG

And provide the smart value you created.  Then check the audit log when you run this automation rule to make sure that you are getting the value you expect in that smart value.

Knowing if that is correct or not is your best first step to solving this issue.

I hope that helps!

-Jimmy

Michael Da Costa
Contributor
March 13, 2023

Hey @Jimmy Seddon thanks for your help. 

Looks like my issue was due to the branch - i was trying to pass variables between branches (not allowed)!

Like Jimmy Seddon likes this
Jimmy Seddon
Community Champion
March 13, 2023

That's good information to know!  Thanks for following up!

Suggest an answer

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

Atlassian Community Events