I'm creating a post function in a workflow. I have 4 different date fields on the issue. (example: Date 1, Date 2, Date 3, Date 4)
I want to find the first non null field and return that value in my Groovy script. I have business priority logic so that I want to examine Date 2 1st, Date 3 2nd, and Date 4 3rd, and Date 1 last.
Basically, if my issue has these 4 values
Date 1: 1/1/2019
Date 2: null
Date 3: 3/3/2019
Date 4: 4/4/2019
I want my groovy code to return 3/3/2019 based on my priority logic.
I know that in SQL they have a COALESCE function, where I could do something like COALESCE(Date 2, Date 3, Date 4, Date 1)
I want to compare the returned date and then compare it to today and then trigger a subsequent action if it meets my criteria.
I'm a newbie Groovy scripter, so I'm kinda stuck
Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events