JQL function for select list field

keram August 22, 2013

Hi

I have a select list field which consist of a values yyyymm e.g 201308 or 201309.
Is it possible to have a JQL function which returns me the value yyyymm based on current date and then I can compare this returned value to the custom select list field in JQL search?

thanks in advance

1 answer

0 votes
EddieW
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 22, 2013

I would suggest using a calculated field - https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+Fields

Be sure to select the Date Time Range picker as the searcher.

This field would populate from 201308 to August 1, 2013 (as a date)

You could then use JQL to do very powerful searches:

customfield > startOfDay()

customField < -3d

or even

ORDER BY customField

see https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-Created for an example of date based searching.

Suggest an answer

Log in or Sign up to answer