Forums

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

How to get max of 2 dates

NIRAL SHAH August 10, 2018

I have 2 or more issues, and a custom field Requested Date, how do I get the max of the requested date as i just want the most recent one. I wish to do this via JQL 

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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 Leaders.
August 11, 2018

JQL is about finding a set of issues that match criteria, it has no functions for processing the results (like picking one out for some reason)

You'll need scripts or code to further process the results of a query

NIRAL SHAH August 11, 2018

Thank you for the response.

1 vote
Constance Hua (Private) August 11, 2018

just order by Requested date, with the most recent at the top :)

NIRAL SHAH August 11, 2018

Thank you for the response. This will still give me all the issues with the latest one on the top. What I need is just that 1 issue.

Constance Hua (Private) August 11, 2018

So my question is why do you need only one? Are you writing a script?

NIRAL SHAH August 11, 2018

No I am not writing a script, just JQL, I am linking it to confluence and the requirement is to show only the last requested date when a particular event occured...

Constance Hua (Private) August 11, 2018

then on Confluence jira macro you should be able to limit to one result only

NIRAL SHAH August 11, 2018

I tried that, but then I would have to have a separate filter for each one of them, and the complexity lies that I have the event occurring for multiple instances. I think I would need code only to filter out those results from the JQL  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events