Forums

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

How find sibling story with same epic

Jim Ralston October 11, 2022

I have situation in which i have multiple user stories that have already been created under a single epic.

 

Desired behavior: When user enters value in one custom field in a child story, and then sets status of that story to done, copy the value for that custom field to same customer field for another 'sibling' story with the same epic, where the 'destination' story has a particular summary value.

However, it seems that automation engine can't identify the sibling story.  What is the correct JQL/smart values to do this?

 

Screen Shot 2022-10-11 at 4.22.55 PM.png

2 answers

0 votes
Jim Ralston October 12, 2022

Apologies Bill - I've tried multiple solutions so i must have munged up the data.

 

Here's the situation:

I have an epic (OP-903) for a piece of work, and it has multiple child stories (e.g., OP-904, OP-905), representing each different piece of the work.  One person works OP-904, gets some info, writes that to the Doxxed field, and then sets status to Done, signifying that their work is done.  The consumer of that Doxxed info works a different ticket, OP-905, so I want to automatically copy the value of the Doxxed field from OP-904 to OP-905 when OP-904 is Done.  

 

Screen Shot 2022-10-12 at 2.17.24 PM.png

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.
October 12, 2022

Thanks, and let's try this again...with some extra condition checks for insurance  :^)

First question: will the child stories *always* have that text of "KYC" and "Dev", or are those subsets or examples of text?  Let's assume they only contain those values.

  • trigger: issue transitioned to Done
  • condition: issue type is Story
  • condition: summary contains KYC
  • branch: on JQL of... parent = {{triggerIssue.parent.key}} AND summary ~ "Dev" AND status = "Backlog" AND "Doxxed" IS NULL
    • action: edit issue to set Doxxed with "Copy from Trigger Issue"

Next question: can issues ever move "backwards" in flow, from Done to earlier steps?  If so, what should happen?

Another question: is there always a 1-1-1 relationship between the Epic, KYC, and Dev stories?  If not, what other patterns are there to handle?

Jim Ralston October 12, 2022

Thank so much...i really do appreciate all your help.  I think the smart values you provided (esp. parent = {{triggerIssue.parent.key}}) will do the trick.

To answer your questions:

The summary names/values will remain constant.  I used shortened KYC (aka "Know Your Customer") and Dev ("Contract Development") for my toy test problem, but the fuller names will always be the same

Its possible, but unlikely, that the issues will move backward in the flow.  Since we're a small operation, and its unlikely, I can handle those with ad hoc manual fixes.

And yes, there will always be that 1:1:1 relationship, between epic, kyc and dev stories.

Now, let me try your suggestion!! :-)

Like Bill Sheboy likes this
Jim Ralston October 12, 2022

Ugh -- Didn't work.  I thought for sure that this would work.

Screen Shot 2022-10-12 at 4.15.52 PM.png

Jim Ralston October 12, 2022

btw i tried without 'AND status = "Backlog" AND "Doxxed" IS NULL' but it didn't work :-(

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.
October 12, 2022

Hmmm...Let's try this: try using that JQL stand-alone with advanced issue search to see what happens:

parent = OP-903 AND summary ~ "Dev" AND status = "Backlog" AND "Doxxed" IS NULL

That will rule out any field errors or search/JQL problems.

Jim Ralston October 13, 2022

That specific code didn't work, but i modified it slightly to a form that DID work: 

"Epic Link" = {{triggerIssue.parent.key}} AND summary ~ "Dev".  This did work!  The additional conditions you suggested are icing on the cake :-)   

Thanks so much!!!

Like Bill Sheboy likes this
Jim Ralston October 13, 2022

So which post to i mark as accepted answer?

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.
October 13, 2022

Team effort on this one, so you can decide...it seems it took seeing the details (as Jack suggested) and then you trying to improve the JQL/rule out problems, that helped to solve this.  I am just happy you got it working!

0 votes
Jack Brickey
Community Champion
October 11, 2022

Can you share the details of your"Then: edit issue fields"? Are you copying the value of the Field from the issue triggering the event? Also are you getting errors in the audit log? Can you share?

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.
October 11, 2022

Hi @Jim Ralston 

Adding to Jack's questions...

Would you please post an image of the audit log details showing the rule execution?  That may provide some context for this symptom.  Thanks!

Kind regards,
Bill

Jim Ralston October 12, 2022

Thanks much for your help.

Please see screenshots attached: a) audit log; b) Story KYC, the "source", see field Doxxed with value 'xyz'.  I set this one to "Done" to trigger the copy/paste; c) Story 'Dev', the "destination", see field Doxxed with value null.  These two stories share common epic link, as per d) epic

 

Screen Shot 2022-10-12 at 11.45.22 AM.pngScreen Shot 2022-10-12 at 11.45.35 AM.png

Screen Shot 2022-10-12 at 11.50.42 AM.png

Jim Ralston October 12, 2022

Sorry - i think these are out of order now -- here's the audit log

 

Screen Shot 2022-10-12 at 11.43.20 AM.png

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.
October 12, 2022

Hi!

You appear to have changed the JQL in the branch for your rule, from the original question and the new image posts...and neither one of those JQL values is going to match the sibling story's Summary field of "Dev"

I feel I am missing what you are trying to do.

Jim Ralston October 12, 2022

Apologies Bill - I've tried multiple solutions so i must have munged up the data.

Also this is first time that I've used this tool so apologies for providing Answer above when i meant to reply. I don't see a way to delete that.

 

Here's the situation:

I have an epic (OP-903) for a piece of work, and it has multiple child stories (e.g., OP-904, OP-905), representing each different piece of the work.  One person works OP-904, gets some info, writes that to the Doxxed field, and then sets status to Done, signifying that their work is done.  The consumer of that Doxxed info works a different ticket, OP-905, so I want to automatically copy the value of the Doxxed field from OP-904 to OP-905 when OP-904 is Done.  

 

Screen Shot 2022-10-12 at 2.17.24 PM.png

Suggest an answer

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

Atlassian Community Events