Content
View differences
Updated by Jan Sandbrink 11 months ago
Right now, OpenProject sends only direct work package information as payload (Type, Status, Assignee, ...) but doesn't include comments. That is unfortunate as a comment can be as important as a status transition. For a useful integration we need to build that comments get transmitted via webhook calls, too.
**Acceptance criteria**
In the form for setting up or editing a webhook in the **Enabled events** section
* A new resource type The **Work package comments** is added, with packages** section has two options more event types
* Comment
* Internal comment
* Firing of To maintain backwards compatibility webhooks will continue firing and executing requests for **work packages** must "Updated" events if "Comments" and "Internal Comments" are not be affected by this new feature activated.
* If "Comments" is activated then it will fire on non-internal comments.
* The JSON Payload will be equivalent to the corresponding API V3 Activity representation (JSON)
* It will not fire for new internal comments.
* It will not send an extra request for work package "updated".
* If "Internal comments" is activated then it will fire on internal comments.
* The JSON Payload will be equivalent to the corresponding API V3 Activity representation (JSON)
* It will not fire for non-internal comments
**QA Notes**
One way to test webhooks is using [https://www.svix.com/play/](https://www.svix.com/play/), which allows to register temporary URLs that can receive webhooks and
* It will show you what they received.
Note that all those webhooks (old and new) are fired after the journals can't be aggregated anymore. That is the time after which you'd see a new activity entry on the right if you did not send an additional change and by default it is 5 minutes.
extra request for work package "updated".
* <figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="https://private-user-images.githubusercontent.com/327272/457897280-7bd9eca9-37c2-4a94-8e45-2ebc3d0b6358.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTA2ODA5ODMsIm5iZiI6MTc1MDY4MDY4MywicGF0aCI6Ii8zMjcyNzIvNDU3ODk3MjgwLTdiZDllY2E5LTM3YzItNGE5NC04ZTQ1LTJlYmMzZDBiNjM1OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYyM1QxMjExMjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jYmRmZTM3YmIyMWJlMGEyOWI4YWRlNDk5MTZmMmU2ZDU0MmUzNWM5MGVjZTFjZmViMDVlZTg3MTdiNWE4MThlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.MiZT2iVKBXLKPzhN7eT3VOPE4C7XCNErLHJBq--mDKM" alt="image"></div></figure>
**Acceptance criteria**
In the form for setting up or editing a webhook in the **Enabled events** section
* A new resource type
* Comment
* Internal comment
* Firing of
* If "Comments" is activated then it will fire on non-internal comments.
* The JSON Payload will be equivalent to the corresponding API V3 Activity representation (JSON)
* It will not fire for new internal comments.
* It will not send an extra request for work package "updated".
* If "Internal comments" is activated then it will fire on internal comments.
* The JSON Payload will be equivalent to the corresponding API V3 Activity representation (JSON)
* It will not fire for non-internal comments
**QA Notes**
One way to test webhooks is using [https://www.svix.com/play/](https://www.svix.com/play/), which allows to register temporary URLs that can receive webhooks and
* It
Note that all those webhooks (old and new) are fired after the journals can't be aggregated anymore. That is the time after which you'd see a new activity entry on the right if you did
*