Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-26361

Fix DATE comparisons in NXQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 10.2
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Search Tab

      Description

      NXQL it's not managing properly DATE comparisons

      Steps to reproduce:

      • Set the expiration date of a document to "2018-12-07T23:00:00.000Z"

        "dc:expired": "2018-12-07T23:00:00.000Z",

      • Browse to ADMINISTRATION > NXQL Search menu
      • Introduce this NXQL sentence and click on Search
        SELECT * FROM Document 
           WHERE 
              ecm:mixinType != 'HiddenInNavigation' 
              AND ecm:isProxy = 0 
              AND ecm:isVersion = 0 
              AND ecm:isTrashed= 0 
              AND dc:expired = DATE '2018-12-07'
        

      No results are returned.

      You must use a date range to find the documents of a given date to find the document:

      SELECT * FROM Document 
         WHERE 
            ecm:mixinType != 'HiddenInNavigation' 
            AND ecm:isProxy = 0 
            AND ecm:isVersion = 0 
            AND ecm:isTrashed= 0 
            AND dc:expired >= DATE '2018-12-07'
            AND dc:expired < DATE '2018-12-08'
      

      Using DATE instead of TIMESTAMP you must be able to find a document for his date without specifying the time

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: