My scenario is this:
I have found a working trigger in "When value for Parent" and can from the trigger issue (subtask A3 find both the newParent (via fieldChange.toString + lookup issue (first), or simply via issue.parent) and also the oldParent (fieldChange.fromString + lookup issue (first)).
Furthermore, I can recalculate the size of newParent storyB since it's the parent of the triggerissue.
So far, all good.
But even though I can find the reference to oldParent storyA I'm currently stumped on how to edit anything in storyA, since EditIssue action always works on triggerissue...
Is there a way to define on which object (in my example that would be story A) the EditIssue action edits?
Something similar to this in the EditIssue / Additional fields box:
{
"fields": {
"[storyA].[Story point field]": {{lookupIssues.story points.sum}}"
}
}
Hi @Niklas Malmberg ,
Something like this should work
Basically we store both the old and new parents in variables, and then create two separate branches for each of them using JQL. Here I'm just logging the parent keys, but you can do the calculations you need in those branches.
Hope that helps!
Note that the reason this works is that - inside a branch - "issues" refers to the issues captured in that branch (in this case, those returned by the JQL) and not 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.
Indeed @Hariharan Lyer, this works!
(I was close but didn't manage to use the correct syntax for branch For: JQL . Your example works just fine.)
This also is an explanation to my question: Can editIssue edit anything else that triggerissue? And as you demonstrated, yes indeed, the issue.key reference inside the branch context depends on the branching statement.
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.