Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9881

Task filter properties with nested structures are not deserialised correctly

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.11.0, 7.11.0-alpha3
    • Component/s: engine
    • Labels:
      None

      Description

      Steps to reproduce

      1. Go to Tasklist
      2. In the left sidebar, edit a filter
      3. In the modal dialog, click on "Variables" in the accordion
      4. Add a variable
      5. Click on Save
      6. Reproduce steps again until including step 3

      Observed behavior
      Previously saved variable is not shown.

      Expected behavior
      Previously saved variable is shown.

      Hint
      The variables are stored as properties of Filter in tasklist:

      {"variables":[{"name":"amount","label":"Invoice Amount"},{"name":"invoiceNumber","label":"Invoice Number"},{"name":"creditor","label":"Creditor"},{"name":"approver","label":"Approver"}],"description":"All Tasks - Not recommended to be used in production :)","priority":10}
      

      When the filter is fetched FilterEntity#setPropertiesInternal() is called. [1]
      Then JsonUtil.asMap(json); loses the variables because it doesn't handle the nested collection correctly. [2]

      [1]: https://github.com/camunda/camunda-bpm-platform/blob/a6b16b2a1e69f8669bf8b00f58a16641c9696bf5/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/FilterEntity.java#L159
      [2]: https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/util/JsonUtil.java#L669-L700

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.schoettes Michael Schoettes
              Reporter:
              yana.vasileva Yana Vasileva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: