Content
View differences
Updated by Attila Dombi about 1 year ago
This appears to be a follow-up to <mention class="mention" data-id="58287" data-type="work_package" data-text="#58287">#58287</mention>
We've just updated from OpenProject 13 where we had configured webhooks to fire when work packages are created. created.
The work package payload includes an embedded project resource, and our webhook receiver looks for the value of various custom fields on that project to determine where to send a notification.
Since the upgrade (now on 15.4.0) the values of these project custom fields are `null`. (custom fields on the work package itself do come through correctly)
### Steps to reproduce
* Add custom field to a project
* Configure a work package webhook
### What is the buggy behavior?
Custom fields for embedded project are all null:
```text
{
"action": "work_package:created",
"work_package": {
"_embedded": {
"project": {
"customField4": null,
"customField9": null,
"customField6": null,
"customField8": null,
```
<br>
### What is the expected behavior?
This is an abbreviated sample of the output we received from OpenProject 13:
```text
{
"action": "work_package:created",
"work_package": {
"_embedded": {
"project": {
"customField4": {
"format": "markdown",
"raw": "Support",
"html": "<p class=\"op-uc-p\">Support</p>"
},
"customField8": true,
"customField6": "2024-05-01",
"customField9": 100,
```
###
### Environment information
**OpenProject installation type**
* Docker All-in-one container
<br>
**OpenProject version**
15.4.0
### Note for QA/L2 testing
Steps for testing:
1. Create various project custom fields, some of them should have the "Admin only" setting enabled.
2. Enable the custom fields in a project and set a value to them.
3. Create a webhook in the global admin page where:
1. enabled events are the Work package update and create.
2. set the webhook payload url provided by a webhook service like `https://webhook.site`.
4. Create a work package in the same project from step #2.
5. After a while (it could take ~5 minutes), a new request should appear on the webhook service site.
6. Find the project attributes under the `"_embedded"` key in the request json and look for the values of `customField*` keys.
7. All the custom fields should have a value and it should correspond with the project custom field values set in the project from step #2.
For an easy set up of the webhook for testing, it is recommended to use a webhook receiving service like [`https://webhook.site`](https://webhook.site/).
The service will register the request body of the webhook call, where the project custom fields can be verified.
We've just updated from OpenProject 13 where we had configured webhooks to fire when work packages are created.
The work package payload includes an embedded project resource, and our webhook receiver looks for the value of various custom fields on that project to determine where to send a notification.
Since the upgrade (now on 15.4.0) the values of these project custom fields are `null`. (custom fields on the work package itself do come through correctly)
### Steps to reproduce
* Add custom field to a project
* Configure a work package webhook
### What is the buggy behavior?
Custom fields for embedded project are all null:
```text
{
"action": "work_package:created",
"work_package": {
"_embedded": {
"project": {
"customField4": null,
"customField9": null,
"customField6": null,
"customField8": null,
```
<br>
### What is the expected behavior?
This is an abbreviated sample of the output we received from OpenProject 13:
```text
{
"action": "work_package:created",
"work_package": {
"_embedded": {
"project": {
"customField4": {
"format": "markdown",
"raw": "Support",
"html": "<p class=\"op-uc-p\">Support</p>"
},
"customField8": true,
"customField6": "2024-05-01",
"customField9": 100,
```
###
### Environment information
**OpenProject installation type**
* Docker All-in-one container
<br>
**OpenProject version**
15.4.0
### Note for QA/L2 testing
Steps for testing:
1. Create various project custom fields, some of them should have the "Admin only" setting enabled.
2. Enable the custom fields in a project and set a value to them.
3. Create a webhook in the global admin page where:
1. enabled events are the Work package update and create.
2. set the webhook payload url provided by a webhook service like `https://webhook.site`.
4. Create a work package in the same project from step #2.
5. After a while (it could take ~5 minutes), a new request should appear on the webhook service site.
6. Find the project attributes under the `"_embedded"` key in the request json and look for the values of `customField*` keys.
7. All the custom fields should have a value and it should correspond with the project custom field values set in the project from step #2.
For an easy set up of the webhook for testing, it is recommended to use a webhook receiving service like [`https://webhook.site`](https://webhook.site/).
The service will register the request body of the webhook call, where the project custom fields can be verified.