Have an interesting question on a rule that I have not started building just yet that I was hoping to get guidance from yall on.
So right now we have Features in Jira, as child tickets teams also create Epics that are linked to that Feature via a parent field.
The epics are required to have target start / target end dates to roughly gauge when work may finish (or assess delays).
A Feature may have 5-10 child Epics linked up to it all with varying Target start / target end dates. Essentially we would like to 'scan' these dates whenever there is an update and then add the latest date to the Feature level.
For example:
The automation should scan those dates and put 9/30/25 into the Target End field on the Feature level.
I assume I need to create a variable that stores all the target ends of the child tickets ,which I can do (because yall have helped with this in the past), what I dont know how to do is to only take the one target end (the one furthest out) to place at the feature level. Any thoughts? Thanks in advance!
Hi @Travis Hill
Without seeing your actual rule...
Perhaps try using the Lookup Issues / Work Items action with JQL to gather the children, and then use the min (or max) list functions with the date fields:
Kind regards,
Bill
That is an excellent recommendation. Let me try it out and get back to you if we run into issues.
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.
That expression is not correct. An example to set that field could be:
{
"fields": {
"customfield_10023": "{{lookupIssues.customfield_12345.max.jiraDate}}"
}
}
Please adjust the rule accordingly if the trigger work item is not the Epic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, seems like im still getting the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please show images of your complete Edit Work Item action and of the audit log details for the rule execution (with the areas at the right side expanded).
I also recommend writing that entire JSON expression to the audit log before the edit to confirm it contains what you expect when the rule runs.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like I need to rework it. Its not pulling in what I want in the logs. I will get back to you on this one!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy finally had some time to get back to this. I was able to get it to log the dates finally but Im getting a formatting error when I try to populate the max date into the parent ticket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Travis Hill
Please post images of:
And just to confirm, that is the built-in Target End date, correct?
If so, I believe the value is provided to rules as a text representation of the date, and so it needs to be converted to an actual date before the max function is used, and then converted back to text for the JSON:
{{lookupIssues.customfield_10023.toDate.max.jiraDate}}
I recommend writing that value to the audit log to confirm it works as expected.
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.
Thanks for that information, please try the expression I suggested with the conversion before the max function:
{{lookupIssues.customfield_10023.toDate.max.jiraDate}}
And, some FYIs:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy this worked like a charm. Youre an absolute genius thank you.
I have one use case that maybe you could help with but itll be so inconsistent in occurrence that if we cant fix it, its fine.
So I tested it and added dates to 2-3 child tickets and the parent would always update with the last one in chronologically. However when I cleared all the child ticket dates out and there was nothing to log, it left the last date in the parent ticket.
Is there a way to clear the field if the log retrieves nothing?
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.