I am trying to write some automation to clone an epic and all the stories but the branching part of my automation is not finding any stores/tasks in the epic to clone. I've used by For: Stories in Epic as well as some actual JQL that ought to return tickets. I thought the original For: Stories was perhaps confused by which epic it was looking at and picking up the new cloned and empty epic. Hence trying the JQL.
If I can get this to recognize the tickets in the epic then setting the epic link should be easy. The problem seems to be getting the for loop to see anything.
This appeared to be caused by restrictions/permissions set at the configuration level of the epic, which then got inherited by my epic I wanted to clone and somehow interfered with the For: Stories loop (or any other attempt to loop through this epic).
Here is a sample showing the difference running against the epic that inherited permissions (at 04:57) and the epic that was created after we removed the epic permissions/restrictions (04:47).
Here is the automation in place, same automation run in both cases.
Furthermore, changing the Actor from "Automation for Jira" to "User who triggered the change" means it works for the old epic too. Definitely a permission issue for the automation user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm Luka from codefortynine and if you further encounter any further problems with cloning your Epic hierarchy, you could try our Deep Clone for Jira. Deep Clone is able to clone whole issue hierarchies (Initiative ⇒ Epic ⇒ Task/Story ⇒ Subtask) with minimal effort thanks to our Epic/Tree Clone feature.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This has something to do with permissions on PENG, in my test project my automation works fine. Here is a sample of the audit log showing the for loop not detecting any stories/tasks in the epic. I am looking more closely at what restrictions were in place on things like epics and stories. The good news is my automation works. The bad news is I don't yet know what bit in PENG is messing it up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jezza Sutton
Can you show us the Audit Log output for an execution of the rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding to Trudy's question:
Would you please show the action to create the variable oldEpic? I suspect this may be where the problem exists.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The For: JQL failed even when I specified the parent ticket directly (and verified it returns the records I want). I will post what I now have working - the root cause appears to have been some restrictions applied at the configuration level of the Epic that the epic inherited. Since removing those restrictions, the automation works with new epics created since the change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jezza Sutton ,
Are those stories from the same project as you have in scope = PENG? If not, then Automation might have trouble recognizing it, as the rule scope is not set to that project.
If that is not the case, could you use action Lookup issues, use the same JQL and then log variable {{lookupIssues}} to see if it returns anything?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same scope, yes. I also tried using For: JQL and supplying parent = PENG-2652 to explicitly look up stories, which validates in my automation set up but does not work in actual running it.
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.