I am running into an issue with automation to have the child min and max start and due dates top roll up to the parent start and due date. It seems to be pulling the due date no problem but it's not pulling the start date.
Hello @ckopanon
Can you tell us the type of Space this concerns? Click on the ... next to the Space name in the navigation panel on the left and tell us what the last two lines say. That will be something like:
Software spaceCompany-managed
Has this rule ever worked previously?
It is possible that there is more than one field in your system named "Start date" and the rule is not getting the correct one within the Edit Work Item action. An alternative method to set the value would be to use the custom field id instead of the custom field name as the reference; i.e.
{{lookupIssues.customfield_11111.min}}
You would need to find the correct ID for that specific "Start date" field. This document explains how that can be done.
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Hi @ckopanon
Start Date is one of the date fields which appears as text to automation rules...similar to other roadmap fields. The workaround for your scenario is to convert the value with the toDate function before attempting to use the min function, and then convert back to the necessary date format as text.
For example:
{{lookupIssues.Start date.toDate.min.jiraDate}}
Please see updates below...
Kind regards,Bill
@Bill Sheboy
Is that documented somewhere by Atlassian? I'd like to bookmark that for future reference.
I thought I remembered that min and max did not work for all date fields, but did not find the details in my quick internet search.
Hi @Trudy P Claspill
I recall discovering that symptom by experimentation with Start Date and Target End...although I just tested again and {{issue.Start date}} worked as a date without conversion. Thus, something has changed over time, and the text format is not the cause of the symptom seen by @ckopanon
Either a duplicate field or rule scoping are likely causes. (i.e., is the rule in the HI project as shown in the JQL, and should it instead refer directly to the parent)
Regarding the min function, date and date / time picker fields are essentially a number, and thus the min function will work on either one correctly. The JPD date format is JSON-as-text, and will not work with min until a value is converted and extracted.
Thanks for keeping me honest to test my suggestions before posting!
yes, software space, company managed.
this is the first time the rule has been created and run so no, it has not worked for start date ever. only works for due date currently.
i did try this with the Start date custom field ID and still did not work.
Field names are case sensitive in smart values. Can you confirm that you have the case correct for the "Start date" field?
As a test in the rule can you add a Branch to iterate over the Lookup Work Items results and use the Log action to print to the execution log the value from the "Start date" field for each item?
yes, i can confirm i have the case correct.
i added the branch and it looks like the log is only showing the start date for the child work item
Please review the earlier posts in this thread where I describe your Lookup Work Item action's JQL does not reference the parent...and thus you may be looking at the wrong work items.
Within the branch, if you wanted the lookup to use the parent, the rule would look like this:
Thanks,Bill
It looks like you're new here. Sign in or register to get started.