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

Fix LogEntryProvider#queryLogs with QueryBuilder and repeated fields

    Details

    • Tags:
    • Team:
      FG
    • Sprint:
      nxFG 11.3.1
    • Story Points:
      3

      Description

      When using a QueryBuilder to query logs and using the same reference in two different predicates, the same variable name is used both times and therefore cannot be replaced with two different values.

      For example, the following QueryBuilder:

      QueryBuilder queryBuilder = new QueryBuilder();
      queryBuilder.and(new Predicate(new Reference("eventDate"), Operator.GTEQ, new DateLiteral(start)));
      queryBuilder.and(new Predicate(new Reference("eventDate"), Operator.LTEQ, new DateLiteral(end)));
      

      results in the following native query:

      FROM LogEntry log WHERE log.eventDate >= :eventDate AND log.eventDate <= :eventDate ORDER BY log.eventDate DESC
      

      The :eventDate variable is then replaced twice by the same value and the query does not return the expected result.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.