Content
View differences
Updated by Jan Sandbrink about 13 hours ago
**As a** user,
**I want** ## **Problem**
When work packages are updated, webhooks to explicitly indicate (including Slack notifications) incorrectly show the original work package **author** instead of the **user who caused a change,
**so that** I can write automations based on made the webhooks that can act based on update**. This causes confusion as teams cannot identify who triggered the user doing an update. notification.
### Acceptance criteria **Discovered in Production**
* Webhooks are extended by an `actor` key I'm a sysadmin running OpenProject in production and noticed this issue when users complained that indicates who caused a give change (e.g. author Slack notifications were showing the wrong person for creations or "updater" work package updates.
## **Root Cause**
The bug was introduced in commit [e3adc26](https://github.com/opf/openproject/commit/e3adc266780196297e459715af2e2e569bacd7a3) (Nov 13, 2019) when the webhook event handler was changed to pass the `work_package` object instead of the `journal`. The journal contains the updater's `user_id`, which was being lost.
### Note for updates)
* `actor` QA
This is only reproducible at an API level - so the fix will need to be verified by a JSON object generated through a regular API user representer
dev.
### Example Environment information
```json
{
"action": "updated",
"actor": { ... },
"work_package": { ... }
}
``` **OpenProject installation type**
* n/a
**OpenProject version**
_dev_
**I want**
When work packages are updated,
**so that** I can write automations based on
### Acceptance criteria
* Webhooks are extended by an `actor` key
## **Root Cause**
The bug was introduced in commit [e3adc26](https://github.com/opf/openproject/commit/e3adc266780196297e459715af2e2e569bacd7a3) (Nov 13, 2019) when the webhook event handler was changed to pass the `work_package` object instead of the `journal`. The journal contains the updater's `user_id`, which was being lost.
### Note
* `actor`
This
```json
{
"action": "updated",
"actor": { ... },
"work_package": { ... }
}
```
* n/a
**OpenProject version**
_dev_