Content
View differences
Updated by Christophe Bliard about 1 year ago
### Steps to reproduce
1. create a work package and open it in two different browser windows
2. in the first window delete the work package
3. in the second window try modifying the dates unclear
### What is the buggy behavior?
* when clicking the dates to open the date picker, a 500 error occurs
* The 500 error is shown on a new page unclear
Error message in AppSignal
```text
Couldn't find WorkPackage with 'id'=4148 [WHERE "work_packages"."id" IN (SELECT "work_packages"."id" FROM "work_packages" INNER JOIN "projects" ON "projects"."id" = "work_packages"."project_id" INNER JOIN "enabled_modules" ON "projects"."id" = "enabled_modules"."project_id" AND "enabled_modules"."name" IN ('work_package_tracking') AND "projects"."active" = TRUE WHERE "projects"."active" = TRUE)]
```
### What is the expected behavior?
1. like when clicking other fields after the work package has been deleted, it should display a gentle message indicating that the work package cannot be found or has been deleted without further ado. unclear
Note: it happens also when restricting visibility of the work package or the project by modifying permissions or stopping a share.
### Screenshots
actual:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/414524/content">
expected:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/414532/content">
### **Logs**
[https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/716](https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/716)
Stacktrace
```text
app/controllers/work_packages/date_picker_controller.rb:191 WorkPackages::DatePickerController#find_work_package
```
1. create a work package and open it in two different browser windows
2. in the first window delete the work package
3. in the second window try modifying the dates
### What is the buggy behavior?
* when clicking the dates to open the date picker, a 500 error occurs
* The 500 error is shown on a new page
Error message in AppSignal
```text
Couldn't find WorkPackage with 'id'=4148 [WHERE "work_packages"."id" IN (SELECT "work_packages"."id" FROM "work_packages" INNER JOIN "projects" ON "projects"."id" = "work_packages"."project_id" INNER JOIN "enabled_modules" ON "projects"."id" = "enabled_modules"."project_id" AND "enabled_modules"."name" IN ('work_package_tracking') AND "projects"."active" = TRUE WHERE "projects"."active" = TRUE)]
```
### What is the expected behavior?
1. like when clicking other fields after the work package has been deleted, it should display a gentle message indicating that the work package cannot be found or has been deleted without further ado.
Note: it happens also when restricting visibility of the work package or the project by modifying permissions or stopping a share.
### Screenshots
actual:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/414524/content">
expected:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/414532/content">
### **Logs**
[https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/716](https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/716)
Stacktrace
```text
app/controllers/work_packages/date_picker_controller.rb:191 WorkPackages::DatePickerController#find_work_package
```