Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-923

add missing timezone parameter in nuxeo-aggregate-data-behavior

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 3.0.0
    • Component/s: Dataviz
    • Backlog priority:
      700
    • Sprint:
      nxGang Sprint 11.1.7
    • Story Points:
      1

      Description

      As of today this elements only returns date histogram based on UTC time.

      The consequence is that the histogram does not display correct values in the user timezone.

      Example:
      A document is created on April 1st at 8am in Japan. Japan time UTC+9 so the document will be counted in the March 31st bucket in the aggregate.

      The date histogram aggregate has a timezone parameter to solve this problem
      https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-aggregations-bucket-datehistogram-aggregation.html

      the timezone parameter can be initialized this way to use the client timezone

      timezone: {
        type: String,
        value: function() {
           return moment().format("Z");
        }
      }
      

      and then added to the object initialized at this line:
      https://github.com/nuxeo/nuxeo-dataviz-elements/blob/e2394040cf000e151cd5af9c3b032c1141ee16d0/nuxeo-aggregate-data-behavior.html#L215

      This issue can be seen in the default dashboards in Webui.

        Attachments

          Issue Links

            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 - 5 hours
                  5h