Forums

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

Help with comparing dates between issue and parent on a custom field

Pini.Matzner November 1, 2021

Hi all,

We are using a custom date field ("End date") and would like to create an automation that will update a parent's date when one of its son-issues end dates are updated beyond the current parent's date.

There's a clear explanation for this use case here - https://community.atlassian.com/t5/Automation-questions/How-to-automatically-set-the-issue-due-date-based-on-subtask-due/qaq-p/1773494 but I can't seem to find the correct JQL for the If comparison (step 3), due to the fact I'm using a custom field.

 

I've attached the current comparison I'm doing (not working well...), after I tried various JQL options.

Would love your insights here...

Thanks!Untitled.jpg

 

 

2 answers

0 votes
Pini.Matzner November 3, 2021

Thanks @Martin Bayer [MoroSystems, s.r.o.] 

 

The "If" part works well now, but I'm struggling with updating the End date of the parent issue...

I've tried two potential solutions here:

  1. using the "Copy End date from Current issue" option under the Edit Issue
  2. Set value of issue.fields.customfield_15322 to the parent in the Edit Issue

both failed, with the same error message, stating that it found multiple fields with the same name and type... 

 

Any idea how I can update the parent's End date (again, a custom field) based on the trigger issue?

0 votes
Martin Bayer [MoroSystems, s.r.o.]
Community Champion
November 1, 2021

Hi @Pini.Matzner welcome on the community :)

Can you share your complete automation so I can play with it a little? Screenshot is Ok for me...

Pini.Matzner November 2, 2021

Hi @Martin Bayer [MoroSystems, s.r.o.] , thanks! I really appreciate it.

Attaching a screenshot of the flow. Let me know if you need more clarification.

I also tried other variations for the If part, such as "triggerissue.End date[Date]" > "End date[Date]", but I didn't seem to make it work correctly.

Untitled.jpg

Martin Bayer [MoroSystems, s.r.o.]
Community Champion
November 2, 2021

Hi @Pini.Matzner so I played with it a little and I think you can use similar condition:

Selection_432.png

Martin Bayer [MoroSystems, s.r.o.]
Community Champion
November 3, 2021

@Pini.Matzner you need to first select you Parent (branch) and set the value from Trigger issue:

Selection_435.pngSelection_436.png

Pini.Matzner November 3, 2021

Sorry, I meant to say that I'm using the trigger issue...

still the same error - 

Found multiple fields with the same name and type - End date (com.atlassian.jira.plugin.system.customfieldtypes:datepicker)

 

I suspect that the issue here is the fact I'm using a custom field with an identical name of another custom field (Multiple projects are built on this Jira). If that's the issue, I should be able to set the date according to the custom field's number just like what solved the "If" part - any idea what can be the JQL for it?

Pini.Matzner November 3, 2021

The Issue was solved - the solution for future reference in case someone encounters the same issue was only renaming the custom field. No other option was working... 

The good news was that the change was done in the field Edit page, and didn't require any data copying to a "new" field. Once the rename was updated, all automation worked perfectly with the new (and unique) name.

Suggest an answer

Log in or Sign up to answer