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

How to compare raw date from lookup table to date in custom field in automation rule?

Ashley September 9, 2024

I have raw dates in a lookup table, similar to this:

Key: Easter24    Value: 2024-03-31

Then I have a custom date picker field, let's call it DPF. 

I am trying to check if Easter24 < DPF via an automation rule branch.

  1. My unsuccessful first attempt:
    1. If block
    2. Smart value condition
    3. {{Dates.get("Easter24")}} less than {{issue.customfield_#####.value}}
  2. My unsuccessful first attempt:
    1. If block
    2. Smart value condition
    3. {{Dates.get("Easter24").toDate}} less than {{issue.customfield_#####.jiraDateTime}}
  3. My unsuccessful third attempt - attempted via an audit log:
    1. Entering this syntax into a log to compare the two dates: [{{Holidays.get("Easter24").toDate}}].isBefore([{{issue.customfield_#####.jiraDateTime}}])

Any ideas on how to compare the two?

1 answer

1 accepted

2 votes
Answer accepted
Ashley September 9, 2024

I found the answer by way of simplification.

{{issue.customfield_#####.isAfter(Holidays.get("Easter24").toDate)}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events