-
Type:
Bug
-
Resolution: Not a bug
-
Priority:
Low
-
None
-
Affects Version/s: 10.0.0, 10.3.7
-
Component/s: Webhooks
-
None
-
10
-
2
-
Severity 3 - Minor
-
21
-
Issue Summary
In Jira version 10.x, the JSON payload for objects includes all child properties explicitly, even if their values are null. This means that each property is present in the JSON output regardless of whether it has a value. For example, the timetracking object appears as follows:
"timetracking": {
"originalEstimate": null,
"remainingEstimate": null,
"timeSpent": null,
"originalEstimateSeconds": null,
"remainingEstimateSeconds": null,
"timeSpentSeconds": null
},
In contrast, in Jira version 9.x, the JSON payload excludes child properties that have null values. The timetracking object would look like this.
"timetracking": {},
However, the REST API output format is unchanged between the version because Jira REST Plugin continues to specify JsonInclude.Include.NON_NULL in its mapper, therefore null values are not included in the REST API output.
NOTE
It is important to note that underlying payload format has not been changed (e.g. "originalEstimateSeconds" was part of the format before and have not changed), and the webhook data is still completely accurate - the only difference is that in 9.12 null values were omitted from the webhook payload, whereas in 10.X they are included.
Steps to Reproduce
- Spin up a Jira 10.x instance and Jira 9.12 instance.
- Create a test project in both the instances, and create a test issue within the project, do not enter any values for time tracking fields.
- Navigate to Administration -> System -> Webhooks, create a test Webhook like below, use any test Webhook receiver URL where you can check inspect the Webhook payload
- Webhook in Jira 9.X

- Webhook in Jira 10.X

- Webhook in Jira 9.X
- Compare the Webhook JSON payload, you will observe that child properties with null values are included in the Jira 10.x instance, however, they are excluded in the Jira 9.x instance.
- In Jira 10.X, you will see the following

- In Jira 9.X, the payload is as follows

- In Jira 10.X, you will see the following
- However, the REST API output is same for both versions
- In Jira 10.X REST API output

- In Jira 9.X REST API output is same

- In Jira 10.X REST API output
Expected Results
Webhook JSON payload is consistent with the REST API.
Actual Results
In Jira 10.X Webhook JSON payload includes child properties with null values
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available