camunda / camunda-modeler-plugins

Plugins for the Camunda Modeler.
168 stars 67 forks source link

Modeler inline comment plugin does not store the comments #100

Open hjstrauss opened 1 year ago

hjstrauss commented 1 year ago

Describe the bug

I installed the plugin: bpmn-js-plugin-embedded-comments ("Embnedded Comments") in Modeler's plugin-directory under Windows 10. Modeler version is 5.10.0. I can add comments during the modelling session. But after save and restart of Modeler, the comments are lost.

Steps to reproduce

  1. add the plugin
  2. start Modeler under Windows and verify if plugin is listed in menu "Plugins"
  3. open a model or create one and add a comment
  4. save the model; ensure no other change happens
  5. close Modeler and restart
  6. open the model and look at the comment: it is gone (at least for me)

Expected behavior

The comments added to a model have to be poersisted after saving the model.

Environment

Additional context

Root cause analysis in https://github.com/camunda/camunda-modeler-plugins/issues/100#issuecomment-1534142964.

nikku commented 1 year ago

Thanks for reporting this bug. Could you link the resource that you're referring to here?

Related, if you find a bug with a plug-in, let's create the bug report there.

hjstrauss commented 1 year ago

Sure, I took the plugin from here: https://github.com/camunda/camunda-modeler-plugins. It is the bpmn-js-plugin-embedded-comments. I can add an internal note in the modeler session. But after saving the model and close/reopen it, the comment is gone.

marstamm commented 1 year ago

I can not reproduce this issue. Note that you need to "post" the comment by pressing "Enter" for the comment to be persisted in the XML.

Recording 2023-05-03 at 14 47 20

hjstrauss commented 1 year ago

I can reproduce at any time if the internal note is the ONLY change in the model. If there are other changes that are also reflected in the model's title bar with a blue point (indicator that a save is necessary) then the internal note is saved as well. But if I only add an internal note text, the blue point is not shown and the note's text is not saved.

marstamm commented 1 year ago

Thanks for the follow-up, I can reproduce this issue. The modeler does not track moddle changes from external namespaces. Not sure if this is an issue with the modeler or the plugin itself, so I'll reopen this ticket in the meantime

nikku commented 1 year ago

This is a limitation in the upstream bpmn-js extension. It simply does not change the model in the appropriate way, hence leaving the modeler with no clue that an actual change happened.

Moving this issue to the plug-in repository.