Compare calculated date fields in JQL

ChristianR February 23, 2016

In our setup, we have two calculated Date fields for which we have a strong need to compare.

I have tried this as follows: issuefunction in datecompare("","DateField1 < DateField2") which returns an error

Field name: DateField1 not found or not a date or datetime.

However, something like this works: DateField1 < now()

Is there some workaround for this? I have found that comparing two calculated dates seems not to work somehow, but I can't imagine that noone has found a solution for this wink

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
ChristianR February 25, 2016

Somehow I can't seem to get "expression" to work... (see my comment above).

 @Jamie Echlin [Adaptavist]: Where do I find my support number to create a support request?

Mark McCormack _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.
February 26, 2016

Hi Christian,

I can help you with finding your SEN for JIRA. Here's an article that covers most Atlassian applications including JIRA:

https://confluence.atlassian.com/support/finding-your-support-entitlement-number-229840018.html

ChristianR February 26, 2016

This only covers SEN for Atlassian applications and some others, but it doesn't help me regarding Adaptavist SEN. I assume I have to have sysadmin privileges to find it in the Scriptrunner configuration page?

Mark McCormack _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.
February 26, 2016

Christian,

You should have admin privileges to be able to get to the Admin console --> Add-ons --> Manage Add-ons then you can find the Adaptavist ScriptRunner Add-on and then you can find the License SEN.

Failing that, please raise the issue without one and ensure we know your company name and we'll look it up ourselves.

0 votes
Pablo Beltran
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.
February 23, 2016

SQL for JIRA supports a lot of auxiliar functions to work with JIRA data, so you can compare dates to create your own custom JQL functions on the fly.

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.
February 23, 2016

Can you try using the expression function which can do the same thing, although the rules around the field names are slightly different.

If you have a commercial version please feel free to create a support request: https://productsupport.adaptavist.com/servicedesk/customer/portal/2 

ChristianR February 23, 2016

Hi Jamie, thanks for your reply.

We are using a commercial version, but I don't have the SEN at hand. I have tried expression, problem seems to be that the field I'm using has spaces in the name. If I don't escape it, the field isn't found. If I use \"My Field Name\" to escape it, I get the error "Error occurred communicating with the server. Please reload the page and try again."

0 votes
Udo Brand
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.
February 23, 2016

What about a third calculated field which gives you the diff itself (or what ever you try to report), than you can query that one!

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events