Content
View differences
Updated by Markus Kahl about 1 year ago
### Before filing a report
_Before you file a report, please ensure you are running the latest version of OpenProject and_
_have searched for similar bug reports._
* _I found this closed/rejected bug-report and commented but I got no reaction, hence opening a new one_
<br>
[_https://community.openproject.org/projects/openproject/work\_packages/59939_](https://community.openproject.org/projects/openproject/work_packages/59939)
### Steps to reproduce
_Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:_
1. Select multiple work packages by holding down CTRL or SHIFT
2. Right click one and edit work packages
3. Change the start and end-date
4. Confirm with OK
**In the case of deletion**
We have observed the same error during bulk deletion. I wasn't able to reproduce it just yet, but the structure we saw was as follows.
```text
Parent Task
Task 1 - preceeds 2, ?
Task 2 - preceeds 3, succeeds 1
Task 3 - preceeds 4, succeeds 2
Task 4 - preceeds 5, succeeds 3
Task 5 - succeeds 4, ?
Milestone 1 - preceeds 2, ?
Milestone 2 - preceeds 3, succeeds 1
Milestone 3 - preceeds 4, succeeds 2
Milestone 4 - preceeds 5, succeeds 3
Milestone 5 - succeeds 4, ?
```
### What is the buggy behavior?
_Please describe the bug in as much detail as possible. Example:_
* The website throws and error 500 and doesn't update the work packages as intended
* The error does not occur always, maybe 3 of 10 times. It can be reproduced
### What is the expected behavior?
_Describe how the application should behave like. Example:_
1. The website confirms the changes and reverts back to the work packages overview page
### Important note
_Please note that unless you are a contributor to OpenProject, you can no longer edit this bug report after saving. You can still add new comments, new images and upload attachments though, but updating description or modifying fields will not be possible after saving. Please make sure that all necessary information and attachments are added, and the following attributes are set:_
### **Logs**
_Are there errors in the browser console? (_[_Click here for information on how to open your browser's console_](https://webmasters.stackexchange.com/a/77337)_) For a local installation: Are there relevant logs output by_ `_openproject logs_` _(packaged installation) (_[_click here for details_](https://docs.openproject.org/installation-and-operations/operation/monitoring/#show-logs)_) or in a log/production.log or /var/log/openproject/ ? Please attach error output in these log files if applicable_
```Debuglog
{"log":"E, [2025-01-09T08:22:25.284821 #1067] ERROR -- : [f20acbcc-396f-49cf-805f-4f1b559a39a9] user=24 Attempted to update a stale object: WorkPackage.: Attempted to update a stale object: WorkPackage.\n","stream":"stdout","time":"2025-01-09T08:22:25.285220189Z"}
{"log":"D, [2025-01-09T08:22:25.284907 #1067] DEBUG -- : [f20acbcc-396f-49cf-805f-4f1b559a39a9] [ActiveRecord::StaleObjectError] Attempted to update a stale object: WorkPackage.: app/services/base_services/write.rb:36:in `persist'; app/services/base_services/base_contracted.rb:64:in `block in perform'; app/models/journal/notification_configuration.rb:40:in `with'; app/services/shared/service_context.rb:67:in `block in without_context_transaction'; lib/open_project/locale_helper.rb:36:in `with_locale_for'; app/models/user.rb:534:in `execute_as'; app/services/shared/service_context.rb:66:in `without_context_transaction'; app/services/shared/service_context.rb:45:in `block in in_mutex_context'; lib/open_project/mutex.rb:71:in `block in with_advisory_lock'; lib/open_project/mutex.rb:69:in `with_advisory_lock'; lib/open_project/mutex.rb:63:in `block in with_advisory_lock_transaction'; lib/open_project/mutex.rb:62:in `with_advisory_lock_transaction'; app/services/shared/service_context.rb:44:in `in_mutex_context'; app/services/shared/service_context.rb:35:in `in_context'; app/services/base_services/base_contracted.rb:54:in `service_context'; app/services/base_services/base_contracted.rb:59:in `perform'; app/services/base_services/base_callable.rb:40:in `block in call'; app/services/concerns/with_reversible_state.rb:53:in `assign_state'; app/services/base_services/base_callable.rb:39:in `call'; app/services/work_packages/bulk/update_service.rb:37:in `alter_work_package'; app/services/work_packages/bulk/bulked_service.rb:65:in `block in bulk'; app/services/work_packages/bulk/bulked_service.rb:57:in `bulk'; app/services/work_packages/bulk/bulked_service.rb:48:in `block in call'; app/models/journal/notification_configuration.rb:62:in `with_first'; app/models/journal/notification_configuration.rb:45:in `with'; app/services/shared/service_context.rb:67:in `block in without_context_transaction'; lib/open_project/locale_helper.rb:36:in `with_locale_for'; app/models/user.rb:534:in `execute_as'; app/services/shared/service_context.rb:66:in `without_context_transaction'; app/services/work_packages/bulk/bulked_service.rb:47:in `call'; app/controllers/work_packages/bulk_controller.rb:47:in `update'\n","stream":"stdout","time":"2025-01-09T08:22:25.285257063Z"}
```
There's a 3000+ line debug log attached.
### Stack trace for bulk deletion
The same error (exception) was also observed during bulk deletion.
The error occurs in the [`reschedule_related`](https://github.com/opf/openproject/blob/release/15.5/app/services/work_packages/delete_service.rb#L83-L102) method of the `WorkPackages::DeleteService`.
My guess is that the error occurs in the method [`update_related`](https://github.com/opf/openproject/blob/release/15.5/app/services/work_packages/update_service.rb#L70-L73) in the `WorkPackages::UpdateService` as well.
In both cases a list of dependent work packages is iterated over and they are saved. This is then when the stale object error occurs because related (e.g. via automatic scheduling) work packages in that list were updated through an update of earlier work packages.
Here is the respective stack trace for the deletion.
```text
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/locking/optimistic.rb:112:in 'ActiveRecord::Locking::Optimistic#_update_row'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/persistence.rb:1234:in 'ActiveRecord::Persistence#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/attribute_methods/dirty.rb:234:in 'ActiveRecord::AttributeMethods::Dirty#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:449:in 'block (2 levels) in ActiveRecord::Callbacks#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/timestamp.rb:140:in 'ActiveRecord::Timestamp#record_update_timestamps'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:449:in 'block in ActiveRecord::Callbacks#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:110:in 'ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:952:in 'ActiveRecord::Base#_run_update_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:449:in 'ActiveRecord::Callbacks#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/timestamp.rb:122:in 'ActiveRecord::Timestamp#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/persistence.rb:1221:in 'ActiveRecord::Persistence#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:441:in 'block in ActiveRecord::Callbacks#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:121:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/autosave_association.rb:375:in 'ActiveRecord::AutosaveAssociation#around_save_collection_association'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:141:in 'ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:952:in 'ActiveRecord::Base#_run_save_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:441:in 'ActiveRecord::Callbacks#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/timestamp.rb:127:in 'ActiveRecord::Timestamp#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/persistence.rb:718:in 'ActiveRecord::Persistence#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/validations.rb:49:in 'ActiveRecord::Validations#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:309:in 'block in ActiveRecord::Transactions#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:365:in 'block in ActiveRecord::Transactions#with_transaction_returning_status'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:361:in 'ActiveRecord::Transactions#with_transaction_returning_status'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:309:in 'ActiveRecord::Transactions#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/suppressor.rb:52:in 'ActiveRecord::Suppressor#save'
/app/app/services/work_packages/delete_service.rb:98:in 'block in WorkPackages::DeleteService#reschedule_related'
/app/app/services/work_packages/delete_service.rb:97:in 'Array#each'
/app/app/services/work_packages/delete_service.rb:97:in 'WorkPackages::DeleteService#reschedule_related'
/app/app/services/work_packages/delete_service.rb:74:in 'WorkPackages::DeleteService#update_ancestors_and_successors'
/app/app/services/work_packages/delete_service.rb:44:in 'WorkPackages::DeleteService#persist'
/app/app/services/base_services/base_contracted.rb:64:in 'block in BaseServices::BaseContracted#perform'
/app/app/models/journal/notification_configuration.rb:40:in 'Journal::NotificationConfiguration.with'
/app/app/services/shared/service_context.rb:67:in 'block in Shared::ServiceContext#without_context_transaction'
/app/lib/open_project/locale_helper.rb:36:in 'OpenProject::LocaleHelper.with_locale_for'
/app/app/models/user.rb:538:in 'User.execute_as'
/app/app/services/shared/service_context.rb:66:in 'Shared::ServiceContext#without_context_transaction'
/app/app/services/shared/service_context.rb:45:in 'block in Shared::ServiceContext#in_mutex_context'
/app/lib/open_project/mutex.rb:71:in 'block in OpenProject::Mutex.with_advisory_lock'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:102:in 'WithAdvisoryLock::Base#yield_with_lock'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:89:in 'WithAdvisoryLock::Base#yield_with_lock_and_timeout'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:72:in 'WithAdvisoryLock::Base#lock_and_yield'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:63:in 'WithAdvisoryLock::Base#with_advisory_lock_if_needed'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/concern.rb:23:in 'WithAdvisoryLock::Concern::ClassMethods#with_advisory_lock_result'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/concern.rb:10:in 'WithAdvisoryLock::Concern::ClassMethods#with_advisory_lock'
/app/lib/open_project/mutex.rb:69:in 'OpenProject::Mutex.with_advisory_lock'
/app/lib/open_project/mutex.rb:63:in 'block in OpenProject::Mutex.with_advisory_lock_transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in 'block in ActiveRecord::ConnectionAdapters::TransactionManager#within_new_transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/concurrency/null_lock.rb:9:in 'ActiveSupport::Concurrency::NullLock#synchronize'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in 'ActiveRecord::ConnectionAdapters::TransactionManager#within_new_transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:212:in 'ActiveRecord::Transactions::ClassMethods#transaction'
/app/lib/open_project/mutex.rb:62:in 'OpenProject::Mutex.with_advisory_lock_transaction'
/app/app/services/shared/service_context.rb:44:in 'Shared::ServiceContext#in_mutex_context'
/app/app/services/shared/service_context.rb:35:in 'Shared::ServiceContext#in_context'
/app/app/services/base_services/base_contracted.rb:54:in 'BaseServices::BaseContracted#service_context'
/app/app/services/base_services/base_contracted.rb:59:in 'BaseServices::BaseContracted#perform'
/app/app/services/base_services/base_callable.rb:40:in 'block in BaseServices::BaseCallable#call'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:121:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/app/services/concerns/with_reversible_state.rb:53:in 'BaseServices::BaseCallable#assign_state'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:141:in 'ActiveSupport::Callbacks#run_callbacks'
/app/app/services/base_services/base_callable.rb:39:in 'BaseServices::BaseCallable#call'
```
### Screenshots and other files
_If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section._
_<img class="image_resized op-uc-image op-uc-image_inline" style="width:1053px;" src="/api/v3/attachments/262070/content">_
### Environment information
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
**OpenProject installation type**
* Docker-compose installation on Debian 12, docker engine 27.3.1
**OpenProject version**
_If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.1.5_
_v15.1_
**Browser**
* [x] Chrome
* [ ] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Operating System**
* [x] Windows
* [ ] Mac OS X
* [ ] Mobile iOS
* [ ] Mobile Android
* [ ] Linux (please specify distro)
* [ ] Chrome OS
* [ ] Other (please specify)
**Language**
_Please specify the browser language and the language of the OpenProject user for which the bug occurred._
_both German_
_Before you file a report, please ensure you are running the latest version of OpenProject and_
_have searched for similar bug reports._
* _I found this closed/rejected bug-report and commented but I got no reaction, hence opening a new one_
<br>
### Steps to reproduce
_Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:_
1. Select multiple work packages by holding down CTRL or SHIFT
2. Right click one and edit work packages
3. Change the start and end-date
4. Confirm with OK
**In the case of deletion**
We have observed the same error during bulk deletion. I wasn't able to reproduce it just yet, but the structure we saw was as follows.
```text
Parent Task
Task 1 - preceeds 2, ?
Task 2 - preceeds 3, succeeds 1
Task 3 - preceeds 4, succeeds 2
Task 4 - preceeds 5, succeeds 3
Task 5 - succeeds 4, ?
Milestone 1 - preceeds 2, ?
Milestone 2 - preceeds 3, succeeds 1
Milestone 3 - preceeds 4, succeeds 2
Milestone 4 - preceeds 5, succeeds 3
Milestone 5 - succeeds 4, ?
```
### What is the buggy behavior?
_Please describe the bug in as much detail as possible. Example:_
* The website throws and error 500 and doesn't update the work packages as intended
* The error does not occur always, maybe 3 of 10 times. It can be reproduced
### What is the expected behavior?
_Describe how the application should behave like. Example:_
1. The website confirms the changes and reverts back to the work packages overview page
### Important note
_Please note that unless you are a contributor to OpenProject, you can no longer edit this bug report after saving. You can still add new comments, new images and upload attachments though, but updating description or modifying fields will not be possible after saving. Please make sure that all necessary information and attachments are added, and the following attributes are set:_
### **Logs**
_Are there errors in the browser console? (_[_Click here for information on how to open your browser's console_](https://webmasters.stackexchange.com/a/77337)_) For a local installation: Are there relevant logs output by_ `_openproject logs_` _(packaged installation) (_[_click here for details_](https://docs.openproject.org/installation-and-operations/operation/monitoring/#show-logs)_) or in a log/production.log or /var/log/openproject/ ? Please attach error output in these log files if applicable_
```Debuglog
{"log":"E, [2025-01-09T08:22:25.284821 #1067] ERROR -- : [f20acbcc-396f-49cf-805f-4f1b559a39a9] user=24 Attempted to update a stale object: WorkPackage.: Attempted to update a stale object: WorkPackage.\n","stream":"stdout","time":"2025-01-09T08:22:25.285220189Z"}
{"log":"D, [2025-01-09T08:22:25.284907 #1067] DEBUG -- : [f20acbcc-396f-49cf-805f-4f1b559a39a9] [ActiveRecord::StaleObjectError] Attempted to update a stale object: WorkPackage.: app/services/base_services/write.rb:36:in `persist'; app/services/base_services/base_contracted.rb:64:in `block in perform'; app/models/journal/notification_configuration.rb:40:in `with'; app/services/shared/service_context.rb:67:in `block in without_context_transaction'; lib/open_project/locale_helper.rb:36:in `with_locale_for'; app/models/user.rb:534:in `execute_as'; app/services/shared/service_context.rb:66:in `without_context_transaction'; app/services/shared/service_context.rb:45:in `block in in_mutex_context'; lib/open_project/mutex.rb:71:in `block in with_advisory_lock'; lib/open_project/mutex.rb:69:in `with_advisory_lock'; lib/open_project/mutex.rb:63:in `block in with_advisory_lock_transaction'; lib/open_project/mutex.rb:62:in `with_advisory_lock_transaction'; app/services/shared/service_context.rb:44:in `in_mutex_context'; app/services/shared/service_context.rb:35:in `in_context'; app/services/base_services/base_contracted.rb:54:in `service_context'; app/services/base_services/base_contracted.rb:59:in `perform'; app/services/base_services/base_callable.rb:40:in `block in call'; app/services/concerns/with_reversible_state.rb:53:in `assign_state'; app/services/base_services/base_callable.rb:39:in `call'; app/services/work_packages/bulk/update_service.rb:37:in `alter_work_package'; app/services/work_packages/bulk/bulked_service.rb:65:in `block in bulk'; app/services/work_packages/bulk/bulked_service.rb:57:in `bulk'; app/services/work_packages/bulk/bulked_service.rb:48:in `block in call'; app/models/journal/notification_configuration.rb:62:in `with_first'; app/models/journal/notification_configuration.rb:45:in `with'; app/services/shared/service_context.rb:67:in `block in without_context_transaction'; lib/open_project/locale_helper.rb:36:in `with_locale_for'; app/models/user.rb:534:in `execute_as'; app/services/shared/service_context.rb:66:in `without_context_transaction'; app/services/work_packages/bulk/bulked_service.rb:47:in `call'; app/controllers/work_packages/bulk_controller.rb:47:in `update'\n","stream":"stdout","time":"2025-01-09T08:22:25.285257063Z"}
```
There's a 3000+ line debug log attached.
### Stack trace for bulk deletion
The same error (exception) was also observed during bulk deletion.
The error occurs in the [`reschedule_related`](https://github.com/opf/openproject/blob/release/15.5/app/services/work_packages/delete_service.rb#L83-L102) method of the `WorkPackages::DeleteService`.
My guess is that the error occurs in the method [`update_related`](https://github.com/opf/openproject/blob/release/15.5/app/services/work_packages/update_service.rb#L70-L73) in the `WorkPackages::UpdateService` as well.
In both cases a list of dependent work packages is iterated over and they are saved. This is then when the stale object error occurs because related (e.g. via automatic scheduling) work packages in that list were updated through an update of earlier work packages.
Here is the respective stack trace for the deletion.
```text
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/locking/optimistic.rb:112:in 'ActiveRecord::Locking::Optimistic#_update_row'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/persistence.rb:1234:in 'ActiveRecord::Persistence#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/attribute_methods/dirty.rb:234:in 'ActiveRecord::AttributeMethods::Dirty#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:449:in 'block (2 levels) in ActiveRecord::Callbacks#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/timestamp.rb:140:in 'ActiveRecord::Timestamp#record_update_timestamps'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:449:in 'block in ActiveRecord::Callbacks#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:110:in 'ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:952:in 'ActiveRecord::Base#_run_update_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:449:in 'ActiveRecord::Callbacks#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/timestamp.rb:122:in 'ActiveRecord::Timestamp#_update_record'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/persistence.rb:1221:in 'ActiveRecord::Persistence#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:441:in 'block in ActiveRecord::Callbacks#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:121:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/autosave_association.rb:375:in 'ActiveRecord::AutosaveAssociation#around_save_collection_association'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:141:in 'ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:952:in 'ActiveRecord::Base#_run_save_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/callbacks.rb:441:in 'ActiveRecord::Callbacks#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/timestamp.rb:127:in 'ActiveRecord::Timestamp#create_or_update'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/persistence.rb:718:in 'ActiveRecord::Persistence#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/validations.rb:49:in 'ActiveRecord::Validations#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:309:in 'block in ActiveRecord::Transactions#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:365:in 'block in ActiveRecord::Transactions#with_transaction_returning_status'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:361:in 'ActiveRecord::Transactions#with_transaction_returning_status'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:309:in 'ActiveRecord::Transactions#save'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/suppressor.rb:52:in 'ActiveRecord::Suppressor#save'
/app/app/services/work_packages/delete_service.rb:98:in 'block in WorkPackages::DeleteService#reschedule_related'
/app/app/services/work_packages/delete_service.rb:97:in 'Array#each'
/app/app/services/work_packages/delete_service.rb:97:in 'WorkPackages::DeleteService#reschedule_related'
/app/app/services/work_packages/delete_service.rb:74:in 'WorkPackages::DeleteService#update_ancestors_and_successors'
/app/app/services/work_packages/delete_service.rb:44:in 'WorkPackages::DeleteService#persist'
/app/app/services/base_services/base_contracted.rb:64:in 'block in BaseServices::BaseContracted#perform'
/app/app/models/journal/notification_configuration.rb:40:in 'Journal::NotificationConfiguration.with'
/app/app/services/shared/service_context.rb:67:in 'block in Shared::ServiceContext#without_context_transaction'
/app/lib/open_project/locale_helper.rb:36:in 'OpenProject::LocaleHelper.with_locale_for'
/app/app/models/user.rb:538:in 'User.execute_as'
/app/app/services/shared/service_context.rb:66:in 'Shared::ServiceContext#without_context_transaction'
/app/app/services/shared/service_context.rb:45:in 'block in Shared::ServiceContext#in_mutex_context'
/app/lib/open_project/mutex.rb:71:in 'block in OpenProject::Mutex.with_advisory_lock'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:102:in 'WithAdvisoryLock::Base#yield_with_lock'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:89:in 'WithAdvisoryLock::Base#yield_with_lock_and_timeout'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:72:in 'WithAdvisoryLock::Base#lock_and_yield'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/base.rb:63:in 'WithAdvisoryLock::Base#with_advisory_lock_if_needed'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/concern.rb:23:in 'WithAdvisoryLock::Concern::ClassMethods#with_advisory_lock_result'
/app/vendor/bundle/ruby/3.4.0/gems/with_advisory_lock-5.1.0/lib/with_advisory_lock/concern.rb:10:in 'WithAdvisoryLock::Concern::ClassMethods#with_advisory_lock'
/app/lib/open_project/mutex.rb:69:in 'OpenProject::Mutex.with_advisory_lock'
/app/lib/open_project/mutex.rb:63:in 'block in OpenProject::Mutex.with_advisory_lock_transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in 'block in ActiveRecord::ConnectionAdapters::TransactionManager#within_new_transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/concurrency/null_lock.rb:9:in 'ActiveSupport::Concurrency::NullLock#synchronize'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in 'ActiveRecord::ConnectionAdapters::TransactionManager#within_new_transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in 'ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction'
/app/vendor/bundle/ruby/3.4.0/gems/activerecord-7.1.5.1/lib/active_record/transactions.rb:212:in 'ActiveRecord::Transactions::ClassMethods#transaction'
/app/lib/open_project/mutex.rb:62:in 'OpenProject::Mutex.with_advisory_lock_transaction'
/app/app/services/shared/service_context.rb:44:in 'Shared::ServiceContext#in_mutex_context'
/app/app/services/shared/service_context.rb:35:in 'Shared::ServiceContext#in_context'
/app/app/services/base_services/base_contracted.rb:54:in 'BaseServices::BaseContracted#service_context'
/app/app/services/base_services/base_contracted.rb:59:in 'BaseServices::BaseContracted#perform'
/app/app/services/base_services/base_callable.rb:40:in 'block in BaseServices::BaseCallable#call'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:121:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/app/services/concerns/with_reversible_state.rb:53:in 'BaseServices::BaseCallable#assign_state'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:130:in 'block in ActiveSupport::Callbacks#run_callbacks'
/app/vendor/bundle/ruby/3.4.0/gems/activesupport-7.1.5.1/lib/active_support/callbacks.rb:141:in 'ActiveSupport::Callbacks#run_callbacks'
/app/app/services/base_services/base_callable.rb:39:in 'BaseServices::BaseCallable#call'
```
_If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section._
_<img class="image_resized op-uc-image op-uc-image_inline" style="width:1053px;" src="/api/v3/attachments/262070/content">_
### Environment information
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
**OpenProject installation type**
* Docker-compose installation on Debian 12, docker engine 27.3.1
**OpenProject version**
_If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.1.5_
_v15.1_
**Browser**
* [x] Chrome
* [ ] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Operating System**
* [x] Windows
* [ ] Mac OS X
* [ ] Mobile iOS
* [ ] Mobile Android
* [ ] Linux (please specify distro)
* [ ] Chrome OS
* [ ] Other (please specify)
**Language**
_Please specify the browser language and the language of the OpenProject user for which the bug occurred._
_both German_