Compare 2 custom date fields in jira

ashleyg July 22, 2014

I have two custom date fields say x and y and i want to list issues in jira issue filter bar using x>y. Now default jira doesn't allow me to directly compare any date fileds whether default jira date fields or custom ones. But script runner plugin atleast allows me to compare directly 2 default jira date fields like resolutiondate>duedate,etc.But script runner doesn't allow to compare 2 custom date fields say x>y. I tried out issuefunction in datecompare("","x>y") but just error

12 answers

0 votes
ashleyg July 24, 2014

Yes Jamie i created GRV-475.

Thanks for the confirmation.

Warm Regards,

Ashley

0 votes
JamieA
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.
July 24, 2014

You created a ticket, when I update the ticket jira will mail you.

0 votes
ashleyg July 23, 2014

Hi Jamie,

Any updates?

0 votes
ashleyg July 22, 2014

Many thanks Jamie...Looking forward to your solution

0 votes
JamieA
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.
July 22, 2014

yeah, i'll get to it.

0 votes
ashleyg July 22, 2014

Hi Jamie,

I just now found out that you are may be the developer of script runner plugin. So if you could please help me on this issue.

For your better understanding i have already included the url https://innovalog.atlassian.net/i#browse/JMCF-87 .

which clearly syas that the issue i'm facing now in jira 6.1.3 is an Atlassian bug and despite making minor changes in the datecompare function as suggested in the url by Mr Fischer i'm unable to get the desired results

If you could please look into all this and please let me know the solution or workaround.

Thanks,

Ashley

0 votes
ashleyg July 22, 2014

Hi,

I even tried whatever is mentioned in the following link:-

https://innovalog.atlassian.net/i#browse/JMCF-87

But i still failed to successfully run my query.

Still prompts the same error as i have already mentioned above

0 votes
Sir Be July 22, 2014
0 votes
ashleyg July 22, 2014

Can you Jamie/Sir help me to correct my query because when i write the same query as:-

project="test" and issuefunction in datecompare("","resolutiondate > duedate") i get the proper results. This clearly shows that for comparing two default jira date fields using script runner is possible but comparing two custom date fields is still not possible.

Or otherwise for comparing two custom date fields i might need to modify my query a bit because error message that prompts says "use compariosn like My date custom field > My Other Date custom field".

Please provide your valuable suggestions on this as i'm getting really frustrated as to despite using script runner why i'm not able to achieve results for such a basic query.

Thanks,

Ashley

0 votes
ashleyg July 22, 2014

Hi Jamie/Sir,

My jira version is 6.1.3

Also the query is:-

project="test" and issuefunction in datecompare("","Planned Delivery Date > Original Planned Date")

Here Planned Delivery Date and Original Planned Date are my two custom fields of Date Picker type.

Also the error i get is Field name Planned Delivery Date not found or not a date or datetime

use comparison like "duedate>resolutiondate",or "duedate>resolutiondate+2w" or "My date Custom Field > My other Date Custom Field"

I hope that answers your query

0 votes
Sir Be July 22, 2014

You (ms giles) forgot again to mention the Jira-version ...

And maybe some formatting or spellings check can be handy too ...

0 votes
JamieA
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.
July 22, 2014

What's the actual query you tried with dateCompare? It should work. What's the error? Don't you think that actually putting the error in the question and saving me asking you for it is appropriate?

Suggest an answer

Log in or Sign up to answer