creecros / MetaMagik

Custom Fields for Kanboard - Plugin MetaMagik
MIT License
98 stars 16 forks source link

[BUG] Lot's of activitiy/notification entries about changing metamagic keys if nothing changed #96

Closed h-e-l-l-o-w-o-r-l-d closed 5 months ago

h-e-l-l-o-w-o-r-l-d commented 5 months ago

Hi,

when a user saves a task without changing anything (this happens too often here), the following annoying things happen:

In short: Lots of information about supposed changes to metamagikkey_X fields, although not true.

I would like to get rid of this. Of course, IF a magickey field really changed, the entries are welcome.

Can you help? The JSON-data in the mentioned tables looks like this:


  "task_id": 3407,
  "task": {
    "id": 3407,
    ...
  },
  "changes": {
    "metamagikkey_Team": "Grafik"
  }
}
creecros commented 5 months ago

That's not a bug, metamagik fields are treated as all other fields, and modifying them will fire events just like normal fields.

Here is an example of where those events are fired, and this is native kb code, so you would need to make exceptions in areas that fire events, and notifications.

https://github.com/creecros/MetaMagik/blob/ac9fdeac26ce92571b904938ce75912da4ab6681/Model/NewTaskModificationModel.php#L45