Less than or equal to (<=) operator does not work correctly towards dates

XMLWordPrintable

    • 8
    • 43

      Problem Definition

      The functionality of the operator Less than or equal to (<=) is not working correctly towards dates.

      JIRA will return the issues that were created before the specified date, but not the ones created on that date.

      For example, issue created on 1 April 2018 can’t be found using the below JQL

      createdDate <=2018-04-01
      

      This is because it will search for issues that are created before 2018-04-01 00:00:00.

      Steps to reproduce

      • Create an issue via CSV, with created date = 2018-04-01;
      • Search for: createdDate <=2018-04-01.

      Expected results

      The issue with created date 2018-04-01 will be returned in the search.

      Actual results

      The issue with created date 2018-04-01 is not returned in the search.

      Workaround

      Search for the date 1 day after the desired one.

      For example, you want to look for issues that were created at or before 2018-04-01:

      • createdDate <2018-04-02.

      Jira supports timestamp precision in JQL. You can append a time value to the date to include issues created during that entire day:
       
       createdDate <= "2018-04-01 23:59"
      This ensures issues created any time on April 1st are included in the results.

        1. screenshot-1.png
          screenshot-1.png
          30 kB
        2. screenshot-2.png
          screenshot-2.png
          539 kB
        3. screenshot-3.png
          screenshot-3.png
          387 kB
        4. screenshot-4.png
          screenshot-4.png
          569 kB
        5. screenshot-5.png
          screenshot-5.png
          390 kB
        6. screenshot-6.png
          screenshot-6.png
          265 kB

            Assignee:
            Unassigned
            Reporter:
            Ammrit Preet Kaur Tuteja (Inactive)
            Votes:
            42 Vote for this issue
            Watchers:
            42 Start watching this issue

              Created:
              Updated: