Forums

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

Date field compared with today's date

Ozan Topkaya July 21, 2023

Hello Team

I want to compare my Date Field "Start-Termin" with today  Date. But the operator == is not working.

Start-Termin: 21.07.2023


issue.get("Start-Termin") == today -> Result: false

issue.get("Start-Termin") >= today -> Result: true

Arbeitsablaufübergang Condition hinzufügen - JIRA Software_2023-07-21_09-42-19.png

Thank you
Ozan

2 answers

1 vote
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 21, 2023

Hi,

Try to log/print the today date and the customfield value, may be they have two different format

0 votes
Ozan Topkaya July 21, 2023 edited

Thanks Mohamed. I have the solution:

issue.get("customfield_13301").format("dd.MM.yyyy") == today.format("dd.MM.yyyy") 
OR
issue.get("customfield_13301").format("dd.MM.yyyy") == new Date().format("dd.MM.yyyy")

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events