IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics
https://bit.ly/2kuu1fT
Other
477 stars 84 forks source link

igGridGroupBy: summaries are ot applied properly when grouping by date column and using min or max functions #2232

Open RivaIvanova opened 1 year ago

RivaIvanova commented 1 year ago

Description

When grouping by a column of type date and applying additional summary configurations for other columns, the results differ when using min or max aggregate functions.

Consider the following configuration:

features: [
  {
    name: "GroupBy",
    groupedRowTextTemplate: "${val} (${count})",
    columnSettings: [
      {
        columnKey: "OrderDate",
        isGroupBy: true,
      },
      {
    columnKey: "UnitPrice",
    summaries: [
          {
             summaryFunction: "min",
             text: "Min :",
          }
        ]
      }
    ],
    summarySettings: {
      summaryFormat: "#.00",
    },
  },
],

The summary result displays the value 1/1/1970: igGridSummariesMin

However, when setting to another aggregate function, for example, avg,

      {
    columnKey: "UnitPrice",
    summaries: [
          {
             summaryFunction: "avg",
             text: "Average :",
          }
        ]
      }

the result is the following: igGridSummariesAvg

This is due to the following check in the _summaries function: igGridSummaries

Steps to reproduce

  1. Open this sample.
  2. Observe the Unit Price Min value.

Result

The results differ when using min or max aggregate functions.

Expected result

The results should be a number representing the min or max value inside the column.

IsiAymeric commented 7 months ago

Hello,

I would like to know when this bug will be corrected. Is there any upcoming release that includes the correction? It's still not working for us, and it's critical for our operations.

Thank you.

ChronosSF commented 3 months ago

@IsiAymeric , please have in mind that 22.2 is no longer supported and while we plan to release a fix soon, it will only be available in 23.1 and 23.2