Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Identify ideas with Date Range vs Specific Date

Mirko Grahnert February 15, 2024

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?

2 comments

Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2024

In Jira automation you could create a smart variable and use substring to get the value for the variable:

Create variable.png


substring(int start, int end)

Returns the characters at the positions specified.

 

 i.e. using summary =  {"start":"2024-03-31","end":"2024-03-31"} as an example:


{{issue.summary.substring(10,20)}} -> 2024-03-31

 

just change summary to the field name

 

Like # people like this
Mirko Grahnert February 15, 2024

Thanks @Stephen_Lugton - that sounds like a great idea - thanks so much! 

Let me try the approach that you suggested ...

Mirko Grahnert February 15, 2024

Works like a charm, thanks @Stephen_Lugton

Chad Nauman February 15, 2024

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.

Mirko Grahnert February 16, 2024

Awesome, thanks @Chad Nauman 

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events