Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize: In reports raw data table is not filled when grouped by ProcessInstance is used #4921

Open
1 task
venetrius opened this issue Feb 4, 2025 · 1 comment
Labels
group:support All requests that are linked to a customer request. DRI: Tassilo scope:optimize Changes to Optimize. type:bug Issues that describe a user-facing bug in the project.

Comments

@venetrius
Copy link
Member

venetrius commented Feb 4, 2025

Environment (Required on creation)

Reproduced on: 3.14.1 & 3.15

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

When creating a report with multiple data source and grouping clause include Process Instance the rawdata table is not populated.

Steps to reproduce (Required on creation)

  1. Create a new non-table report with 2 data source, using a Process Instance view and a group by clause. Running the report produces a graph and the raw data table is visible:
screenshot Image
  1. Add Process Instance to the group by clause and run the report. Running the report produces a graph but no data is show in the raw data table, even though pagination elements are present (and data is received from the server).
screenshot Image

Observed Behavior (Required on creation)

Running the report produces a graph but no data is show in the raw data table, even though pagination elements are present (and data is received from the server).

screenshot Image

Expected behaviour (Required on creation)

Either the table is filled with data properly
OR the logic is changed so the raw data table is not present. This is hinted in this ticket:
"The raw data panel should not be visible in combined reports" (But this refers to combined report and not report with multiple sources)

Root Cause (Required on prioritisation)

In https://github.com/camunda/camunda-optimize/blob/3ae64708bedb37693397aaa5d3e84871b2e5f4ad/optimize/client/src/modules/services/reportService.js#L17 if:

  if (report?.data?.groupBy?.type === 'none' && report?.data?.distributedBy?.type === 'process') {
    report = convertHyperMapToMap(report);
  }

Then https://github.com/camunda/camunda-optimize/blob/3ae64708bedb37693397aaa5d3e84871b2e5f4ad/optimize/client/src/modules/services/reportService.js#L76:

function convertHyperMapToMap(report) {
  const newResult = {...report.result};

  newResult.type = 'map';
  if (newResult.measures) {
    newResult.measures = newResult.measures.map((measure) => ({
      ...measure,
      type: 'map',
      data: measure.data[0]?.value || [],
    }));
  }

  return {...report, result: newResult};
}

this will set measures.data to be null. The table is provided with no data so it renders no data.
I assume this logic is required, but I have not find the use case yet.

Solution Ideas

A, Show data correctly

We can update the check to not convert result to hyperMap if the type is rawd, that way the data is preserved

  if (
    report.result.type !== 'raw' &&
    report?.data?.groupBy?.type === 'none' &&
    report?.data?.distributedBy?.type === 'process'
  ) {
    report = convertHyperMapToMap(report);
  }

B, Hid raw table

Can be done by adjusting: https://github.com/camunda/camunda-optimize/blob/893f21f21ad58ed1c6527bbc7310162979ceb793/optimize/client/src/components/Reports/ReportView.js#L179

Hints

Links

https://jira.camunda.com/browse/SUPPORT-25573

Breakdown

Pull Requests

Preview Give feedback
No tasks being tracked yet.

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment
@venetrius venetrius added scope:optimize Changes to Optimize. type:bug Issues that describe a user-facing bug in the project. group:support All requests that are linked to a customer request. DRI: Tassilo labels Feb 4, 2025
@venetrius venetrius changed the title Optimize: In combined reports raw data table is not filled when grouped by ProcessInstance is used Optimize: In reports raw data table is not filled when grouped by ProcessInstance is used Feb 5, 2025
@yanavasileva
Copy link
Member

yanavasileva commented Feb 5, 2025

Removing from the Project until it's scheduled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group:support All requests that are linked to a customer request. DRI: Tassilo scope:optimize Changes to Optimize. type:bug Issues that describe a user-facing bug in the project.
Projects
None yet
Development

No branches or pull requests

2 participants