openproject icon indicating copy to clipboard operation
openproject copied to clipboard

Bug/journaling sents out notifications even if there are no changes

Open ulferts opened this issue 2 months ago • 0 comments

Ticket

https://community.openproject.org/wp/69448

What are you trying to accomplish?

Sits on top of #21332 to address certain unwanted behaviour identified:

  • Even without a change in the journalized object
    • The journal gets its timestamp updated
    • A notification (OpenProject::Events::JOURNAL_CREATED) is sent out. Since saving of unchanged models in AR normally is an operation without side effects, journaling should behave the same. The code calls save repeatedly in a number of services and it should be ok to do so. This is also the reason for why multiple notifications are sent out on a PIR.
  • The data and associated data of a journal is always deleted and then recreated. As of now, this didn't cause issues but it is just unnecessary.

Merge checklist

  • [x] Added/updated tests

ulferts avatar Jan 08 '26 13:01 ulferts