Smart value get parent information

justin romeo June 19, 2020

Is there any way to have a smart value get information from the parent. I want to have the child get the parents due date using smart values. I know you can set it to reflect the parents due date but i need it in smart values so i can calculate a difference

EX of what i have now:{{issue.dueDate.plusDays(issue.comment.last.body.toDate.diff(TRIGGER.duedate)).jqlDate}}

 

Capture.PNG

2 answers

0 votes
asamala August 26, 2021

Hello @justin romeo ,

 

Did you get this working? I am actually looking for exactly the same functionality. Is there anyway you can provide me the exact automation you set up for this purpose. Your help is greatly appreciated.

 

Thanks

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.
June 19, 2020

Hi @justin romeo -- Welcome to the Atlassian community!

Short answer: probably yes.

Longer answer:

Can you give more details on the expected flow of your rule?  If the parent is the thing triggering, you can use {{triggerissue.duedate}}

If you are triggering from a child changing, moving up to the parent, and then back down to the sibling children, you might need two rules because you cannot nest branching...

Or to do in in one rule:

  • Trigger on child,
  • Branch to parent to get their duedate and save it in triggering child,
  • Re-fetch the triggering child, and
  • Branch on JQL over the sibling children to update them.

 

Best regards,

Bill

justin romeo June 19, 2020

Hey @Bill Sheboy ,

Thank you for responding. Im trying to make it that when a parents due date changes the children's due date change by that same amount.

So my thought process was to save the parents current due date as a comment, then re fetch the issue data, then make the children change their due date by referencing that comment and the parents current due date.

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.
June 19, 2020

Hi, and thanks for clarifying. So...

  • When the Parent Due Date changes...
  • Check if an existing comment exists, you calculate the difference, in order to...
  • Update the children's Due Dates by that difference amount
  • And save the latest Parent Due Date in a comment to refresh it

Correct?

First thing, I wouldn't use a comment for storing the value.  Instead consider adding a custom field of date/time type; maybe Last Due Date.  It will save problems of conversion.  Otherwise, your approach should work.

After you have tried this, using the comment or custom field storage, what issues are you seeing?

justin romeo June 19, 2020

Yeah a custom field would be better, not completely use to jira yet. And that was my only issue so i think i can do it now. 

 

Thank you, ill let you know if i hit more issues :)

Like Bill Sheboy likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2022

Hey @justin romeo  - Did you ever get this working?

Suggest an answer

Log in or Sign up to answer