Hi everyone,
I'm trying to create automation that does the following:
I've managed to do step 1 and 2. So, I have the epic, but I can't seem to set the Epic Link of the trigger issue to the the epic. I've tried creating a variable using the new epic issue's key. The variable is working properly as I can see the correct key in the audit log.
However, when I set the Epic Link on the trigger issue to my variable, the Epic Link is not set.
Any ideas?
Hi Steven - Welcome to the Atlassian Community!
Can you share the actual rule that you have so far?
Hi @John Funk - Thank you for the support.
I've shared a screenshot of the rule so far below.
Basically, when triggered on a issue, the rule will create an epic in the same project and add the initiator as a watcher. Ideally, I'd like the rule to add the trigger issue as a child issue of the epic it just created.
Is there any way to do this?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe create a variable to capture the key of the Epic under the Most recently created issue branch. And then use that value to update the Epic Link field of the trigger issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
I've tried this before, but it hasn't worked. I've update the rule but it's still not worked. I've reviewed the log, which shows the correct {{issue.key}} of the epic, which I'm storing at {{newEpicKey}} and adding to the log. When I set the trigger issue's Epic Link to {newEpicKey}} there's no Epic on the trigger issue and no child issue on the epic.
Am I doing anything wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since the branch fires and does it's thing, the Edit will immediately fire at the same time. So I suspect that the Edit is happening before the branch finishes creating the variable.
Try adding a couple (or 3!) Re-fetch Issue actions immediately prior to the Edit action for the Epic Link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
By pure chance, I've actually just figured out the problem. This time I moved the logging of the variable outside of the branch and the log showed nothing. I did a quick search and stumbled upon a JSWCLOUD ticket (JSWCLOUD-22527).
It appears that variables created inside a branch cannot be used outside the branch except in the case where the variable is initially declared outside the branch first.
So, I've created the variable before branching, copied the same action into the branch, and then used the variable outside the branch.
Here's the new rule that's working.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.