• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 2.4.0-alpha2, 2.4.0
    • None
    • backend
    • None

      Context:
      The structure of the data field of the combined report looks currently like the following:

      "data" : {
          "configuration": {}, // all possible configurations 
          "visualization": "bar",
          "reportIds": [
            "ReportA", "ReportB", ... // a list of report ids
          ]
        }
      

      This has two problems:

      • In the configuration we have a "reportColor": [] field that contains the color for each report that belongs the combined report. If one report is deleted, we need to make sure that this is also automatically done for the color to keep the configuration consistent.
      • The combined report configuration contains a lot of configuration properties that it just doesn't need.

      Hence, we should rather have a structure like this following:

      "data" : {
          "configuration": {}, // only configurations that belong to the combined setup e.g. the target value for combined reports
          "visualization": "bar",
          "reports": [
            {
               "id": "ReportA", 
                "color": "blue", 
             },
             {
               "id": "ReportB", 
                "color": "red", 
             },...]
        }
      

      AT:

      • the combined report data restructure has been changed, such that the report color is not stored in the configuration field any longer and the configuration field only contains entries that belong to the combined report
      • the configuration field of the single report does not contain configuration properties of the single report any longer
      • the rest API documentation has been adjusted accordingly

        This is the controller panel for Smart Panels app

            [OPT-1920] Change configuration structure of combined report in backend

            Johannes added a comment -

            sebastian.bathke: What I have already done:

            • The Combined report contains now its own configuration that only contains the combined report specific values
            • The report colors have been removed from the configuration
            • The Optimize schema has been adjusted
            • The normal IT tests have been adjusted
            • The first version of the data upgrade is implemented

            What's at least left to do:

            • adjust the rest api documentation so it contains a section for combined report configuration + the normal data structure has been adjusted
            • there might be remainings of the {reportColors}

              configuration field from the single configuration somewhere in the upgrade module or somewhere else.

            • the upgrade does not work yet, since the index structure is not updated yet
            • the UpgradeCombinedProcessReportConfigurationDataIT fails, since it uses the current schema initializer. We should hard code the mapping from 2.3 in a json file and then add them manually
            • Make sure that the upgrade tests work + manually test that the upgrade works

            Johannes added a comment - sebastian.bathke : What I have already done: The Combined report contains now its own configuration that only contains the combined report specific values The report colors have been removed from the configuration The Optimize schema has been adjusted The normal IT tests have been adjusted The first version of the data upgrade is implemented What's at least left to do: adjust the rest api documentation so it contains a section for combined report configuration + the normal data structure has been adjusted there might be remainings of the {reportColors} configuration field from the single configuration somewhere in the upgrade module or somewhere else. the upgrade does not work yet, since the index structure is not updated yet the UpgradeCombinedProcessReportConfigurationDataIT fails, since it uses the current schema initializer. We should hard code the mapping from 2.3 in a json file and then add them manually Make sure that the upgrade tests work + manually test that the upgrade works

              Unassigned Unassigned
              johannes.heinemann Johannes
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: