Uploaded image for project: 'Nuxeo Web UI'
  1. Nuxeo Web UI
  2. WEBUI-394

Fix display of Analytics in Arabic

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 2.4.53
    • Component/s: Web UI
    • Release Notes Summary:
      Dates are correctly handled by the audit search when language is set to Arabic.
    • Backlog priority:
      800
    • Sprint:
      UI - 2021-08, UI - 2021-09, UI - 2021-10, UI - 2021-11

      Description

      Steps to reproduce :

      1. log in to Nuxeo WebUI
      2. go to the Analytics page
      3. observe the data are displayed
      4. in Chrome settings, put Arabic on top on the languages
      5. go back to the Analytics tab and do a force-reload of the page
      6. it displays an error with a server side stacktrace
      Caused by: org.elasticsearch.client.ResponseException: method [GET], host [http://localhost:9200], URI [/nuxeo-audit/entry/_search], status line [HTTP/1.1 400 Bad Request]
      {"error":{"root_cause":[{"type":"parse_exception","reason":"failed to parse date field [٢٠٢١-٠٦-٠٩] with format [strict_date_optional_time||epoch_millis]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"nuxeo-audit","node":"X7lj3pz1T9K63VVGQFXteA","reason":{"type":"parse_exception","reason":"failed to parse date field [٢٠٢١-٠٦-٠٩] with format [strict_date_optional_time||epoch_millis]","caused_by":{"type":"illegal_argument_exception","reason":"Parse failure at index [0] of [٢٠٢١-٠٦-٠٩]"}}}]},"status":400}
      

      However the problem comes from WebUI which translates the date from "2021-06-01" to "٢٠٢١-٠٦-٠٩" whereas the dates must not be translated when the _search endpoint is called

      Failing query

      curl -H 'content-type:application/json' -XGET 'localhost:9200/nuxeo-audit/entry/_search?pretty&search_type=dfs_query_then_fetch' -d '{"query":{"bool":{"must":[{"term":{"eventId":"download"}},{"range":{"eventDate":{"gte":"٢٠٢١-٠٦-٠٩","lte":"٢٠٢١-٠٧-٠٩"}}},{"term":{"extended.downloadReason":"download"}}]}},"aggs":{"by":{"terms":{"field":"docUUID","size":10}}}}'
      

      Successful query

      curl -H 'content-type:application/json' -XGET 'localhost:9200/nuxeo-audit/entry/_search?pretty&search_type=dfs_query_then_fetch' -d '{"query":{"bool":{"must":[{"term":{"eventId":"download"}},{"range":{"eventDate":{"gte":"2021-06-01","lte":"2021-07-09"}}},{"term":{"extended.downloadReason":"download"}}]}},"aggs":{"by":{"terms":{"field":"docUUID","size":10}}}}'
      

      This ticket is to request that the dates are not translated when sent as a parameter to the Audit Search endpoint.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 - 1 week, 3 hours
                  1w 3h

                    PagerDuty

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