JIRA JQL searching by date - is there a way of getting Today() (Date) instead of Now() (DateTime)

前端 未结 8 1056
挽巷
挽巷 2021-02-02 05:11

I am trying to create some Issue Filters in JIRA based on CreateDate.

The only date/time function I can find is Now() and searches relative to

相关标签:
8条回答
  • 2021-02-02 05:17

    A friend who is a JIRA wiz showed me that you can actually pass the filter (escaped) as a jqlQuery parameter to JIRA via URL:

    http://hostname/secure/IssueNavigator!executeAdvanced.jspa?clear=true&runQuery=true&jqlQuery=created%3E='2010-05-31%2000:00'%20AND%20created%3C='2010-06-06%2023:59'%20ORDER%20BY%20created%20ASC
    

    I created an ASP.Net page which generates the URLs based on an offset week or month.

    Everybody's happy!

    0 讨论(0)
  • 2021-02-02 05:18

    We're using Jira 6.2 and I use this query:

    updatedDate > startOfDay(-1d) AND updatedDate < endOfDay(-1)

    to return all of the issues that were updated from the previous day. You can combine with whichever queries you want to return the appropriate issues for the previous day.

    0 讨论(0)
  • 2021-02-02 05:20

    I run it like this -

    created > startOfDay(-0d)
    

    It gives me all issues created today. When you change -0d to -1d, it will give you all issues created yesterday and today.

    0 讨论(0)
  • 2021-02-02 05:21

    Just for the sake of keeping the information up-to-date, with at least JIRA 7.3.0 (maybe older as well) you can explicitly specify the date in multiple formats:

    • 'yyyy/MM/dd HH:mm';
    • 'yyyy-MM-dd HH:mm';
    • 'yyyy/MM/dd';
    • 'yyyy-MM-dd';
    • period format, e.g. '-5d', '4w 2d'.

    Example:

    updatedDate > '2018/06/09 0:00' and updatedDate < '2018/06/10 15:00'

    0 讨论(0)
  • 2021-02-02 05:30

    Check out startOfDay([offset]). That gets what you are looking for without the pesky time constraints and its built in as of 4.3.x. It also has variants like endOfDay, startOfWeek, startOfMonth, etc.

    0 讨论(0)
  • 2021-02-02 05:32

    You would expect that this is easily possible but that seems not be the case. The only way I see at the moment is to create a user defined JQL function. I never tried this but here is a plug-in:

    http://confluence.atlassian.com/display/DEVNET/Plugin+Tutorial+-+Adding+a+JQL+Function+to+JIRA

    0 讨论(0)
提交回复
热议问题