What date-format to use in issueFunction expression?

Hi

I've tried several different date-formats in the following filter with no luck.
Any advise?

issueFunction in expression("resolution = Unresolved", "today+remainingestimate > 2017-05-01")

 

Adding a custom date field is very impractical, I would have to update all potential issues with the specific date. (but it returns the expected resultset).

issueFunction in expression("resolution = Unresolved", "today+remainingestimate > myCFdate")

 br

/David Jansson

2 answers

One workaround might be to have one of your JIRA admins add a scripted field that calculates the current date plus the remaining estimate and returns a date. Then you could use dateCompare.

The scripted field would have code along the lines of

import groovy.time.TimeCategory

def today = new Date()
def remainingEstimate = issue.getEstimate()
def calculatedDate
use (TimeCategory) {
    calculatedDate = today + remainingEstimate.milliseconds
}
return calculatedDate

Then the JQL would be

issueFunction in dateCompare("resolution = Unresolved", "'Current date plus resolution scripted field' > 2017-05-01")

Just replace 'Current date plus resolution scripted field' with the actual name of your scripted field.

Make sure to use a datetime searcher and template when setting up your script field.

Hi David,

 

Unfortunately what you are trying to do is not really possible at the moment. 

Please refer to your Adaptavist support ticket for more information.

 

Thanks

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

71 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you