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:Ā 

Help with formula column - Date comparison

Rafael Tognolo
Contributor
July 22, 2022

Hi,

I need help to set up a formula that should display the quarter (Q1, Q2, Q3 and Q4) according to the ticket's due date.

I couldn't find a way to compare the dates and show the respective quarter in the column.

This is the formula that I've tried. I also tried to embed a JQL query, but again, no success.

If

(duedate >= 01-jan-22 and duedate <=31-MAR-22,"{color:red}Q1{color}",
duedate >= 01-apr-22 and duedate <=30-jun-22,"{color:red}Q2{color}",
duedate >= 01-jul-22 and duedate <=31-sep-22,"{color:red}Q3{color}",
duedate >= 01-oct-22 and duedate <=31-dec-22,"{color:red}Q4{ color}")

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Dionathan Lopes {ALM Works}
Atlassian Partner
July 25, 2022

Hello @Rafael Tognolo 

Dionathan from ALM Works here. Welcome to the Community!

If you are using an on-prem version of Structure, please try the following formula code and let me know how it goes:

 

IF(
duedate >= DATE('2022-01-01') and duedate <= DATE('2022-03-31'), "{color:red}Q1{color}",
duedate >= DATE('2022-03-01') and duedate <= DATE('2022-06-30'), "{color:red}Q2{color}",
duedate >= DATE('2022-07-01') and duedate <= DATE('2022-09-31'), "{color:red}Q3{color}",
duedate >= DATE('2022-10-01') and duedate <= DATE('2022-12-31'), "{color:red}Q4{color}"
)

 

PS: Make sure to change the Option to Wiki Markup 

You can also refer to this article for more information about Date and Time Functions 

 

Please let me know if it does help, or if you have any other questions.

Best Regards,
Dionathan

Rafael Tognolo
Contributor
July 25, 2022

Hello Dionathan,

Thank you. It works perfectly :) 

Best regards,
Rafael

Like • Dionathan Lopes {ALM Works} likes this
0 votes
Craig Nodwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 22, 2022

Hi @Rafael Tognolo welcome to the community.  Jira has some great date filtering functions.  Have a look at this page.

Rafael Tognolo
Contributor
July 24, 2022

Hi @Craig Nodwell thank you.
I forgot to mention that the help needed is related to the formula columns in Jira Structure.