Skip to content

DRYD-2131 Search > Qualifiers > 'is/is not' isn't recognizing dates#555

Merged
spirosdi merged 1 commit into
developfrom
bugfix/dryd-2131
Jul 22, 2026
Merged

DRYD-2131 Search > Qualifiers > 'is/is not' isn't recognizing dates#555
spirosdi merged 1 commit into
developfrom
bugfix/dryd-2131

Conversation

@spirosdi

Copy link
Copy Markdown
Contributor

What does this do?
Changed CoreSessionWrapper from converting NXQL timestamp literals to server-local time to converting them to UTC. Zone-qualified literals are normalized to UTC and unqualified ones are still interpreted as server-local time and then converted to UTC.

Why are we doing this? (with JIRA link)
https://collectionspace.atlassian.net/browse/DRYD-2131. The new Nuxeo version interprets all timestamp NXQL values as UTC: https://doc.nuxeo.com/nxdoc/nxql/#date-properties. The CoreSessionWrapper was still converting them to server-local time (added in DRYD-114 for older Nuxeo's local-time interpretation). On servers whose JVM runs in a non-UTC timezone, this shifted every date query by the UTC offset, so "is/is not" date searches returned no results.

How should this be tested? Do these changes have associated tests?
In order to reproduce the issue locally:

  1. Build and deploy current develop branch
  2. Change in $CATALINA_HOME/bin/setenv.sh -Duser.timezone=UTC to -Duser.timezone=America/Los_Angeles and then start tomcat
  3. Search by an annotation date that should return results and confirm that no results are returned

Testing the fix using staff UI:

  1. Build and deploy the feature branch
  2. Keep the timezone to America/Los_Angeles
  3. Search by an annotation date that should return results and confirm that results are returned.

Testing the fix using different timestamp types:

  1. Create a new Object Record using Staff UI with annotation date set to "2026-07-21"
  2. The probe() function performs annotation date searches and accepts the timestamp as a parameter:
probe() {
  curl -sG -u admin@core.collectionspace.org:Administrator \
    "http://localhost:8180/cspace-services/collectionobjects" \
    --data-urlencode "as=(collectionobjects_annotation:annotationGroupList/*/annotationDate $1)" \
    --data-urlencode "wf_deleted=false" \
    | grep -o 'totalItems>[0-9]*'
}
  1. probe '= TIMESTAMP "2026-07-21T00:00:00.000Z"' # expect 1 (what the UI sends UTC)
  2. probe '= TIMESTAMP "2026-07-20T17:00:00.000-07:00"' # expect 1 (offset-qualified)
  3. probe '= TIMESTAMP "2026-07-20T17:00:00"' # expect 1 (unqualified server-local, DRYD-114 contract preserved)
  4. probe '<> TIMESTAMP "2026-07-21T00:00:00.000Z"' # expect 0 (assuming this is the only annotated record)

Dependencies for merging? Releasing to production?
No dependencies

Has the application documentation been updated for these changes?
No changelog change necessary

Did someone actually run this code to verify it works?
@spirosdi ran it locally

Have any new security vulnerabilities been handled?
no new security vulns

@spirosdi
spirosdi requested a review from mikejritter July 21, 2026 14:01

@mikejritter mikejritter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested each scenario and verified expected results

@spirosdi
spirosdi merged commit 30e2e92 into develop Jul 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants