Hello everyone!
I am trying to figure out how to filter ideas in JPD based on the presence or absence of a specific date in a date field.
Here's the context: In our workflow, we require a defined completion date (DD-MM-YYYY) for an idea to progress from 'Next' to 'Now' on our roadmap. If an idea transitions to 'Now' with a completion date set as a date range (MM-YYYY), we'd like to trigger a notification to remind the owner to update the completion date.
As far as I can tell, a specific date is selected if the value following 'start' equals the value after 'end', as shown in this example: {"start":"2024-03-31","end":"2024-03-31"}. The challenge, however, is that this information is captured as one value, making it difficult to utilize the Advanced Compare Condition in Jira automations.
Any ideas, thoughts, or suggestions on how to achieve this?
Thanks @Stephen_Lugton - that sounds like a great idea - thanks so much!
Let me try the approach that you suggested ...
I created an automation to extract dates from the Project Target and Project start fields in JPD leveraging regex. This is how I did it:
Jira Automation:
Setup a smart value variable
{{issue.Project start.match("(\d{2,4}-\d{1,2}-\d{1,2})").first.toDate("yyyy-MM-dd")}}
and
{{issue.Project target.match("(\d{2,4}-\d{1,2}-\d{1,2})").last.toDate("yyyy-MM-dd")}}}}
Notice that I assume for Project Start, the first value is the one to use and for Project Target, the last value is the one to use - this ends up having the effect of leveraging the whole range in "date" field on JPD. The other solution described as replies to this thread will work too but if you want to use the resultant values in other jira date fields (like on a delivery epic ticket), then it can be tricky so you usually will want to convert the string to a date object.