The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to format a Date Value before using (testing) it?

mateus.oliveira
August 5, 2024

I'm writing a JQL to check the Due Week of the issues created, and I'm using a date field called "Deployment Date".

{{"Deployment Date".format ("w")}} gives me the value I need, but that only works when Smart Values and formats can be used. When I try to do a lookup and get all the other issues and their Deployment Date week so I can compare with the week of Deployment Date of a new task, the JQL breaks because it expects only operators... It's not clear if there's absolutely no way to format values before using them when searching.

How can I format a value during/before the comparison? What's the correct syntax so that I can use values/date values in the format I need them to be?

Thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Trudy P Claspill
Community Champion
August 5, 2024

Hello @mateus.oliveira 

Is this in the context of an Automation Rule? If so, please show us the entire automation rule.

Regardless I believe that the answer is you can't apply the format command to a date field within a JQL statement. You will have to do the comparison outside of the JQL statement.

mateus.oliveira
August 6, 2024

jira-date-format.jpg

This is what I have so far.

But, based on what you mentioned, I'll probably have to use a different automation to format the value I need to compare and save the formatted value on a different field... THEN use the Lookup Issues to check this field and compare to the formatted smart values from the triggerIssue...

Thanks!