ServiceNow Jira Spoke Webhook - "Cannot read property 'name' from undefined" while processing Jira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Experts,
I am working on a ServiceNow Jira Spoke webhook integration using the OOTB webhook endpoint:
/api/sn_jira_spoke/jira_webhook_callbacks/wh_entry
We are using:
OOTB Jira Webhook endpoint
Custom Webhook Registry
Custom Decision Table
Custom Subflow
The webhook reaches the ServiceNow endpoint, but we receive the following error:
Cannot read property 'name' from undefined
The stack trace points to the OOTB Script Include used by the Jira Spoke while building the Decision Table inputs.
During debugging, we found that the following OOTB method directly accesses nested fields:
inputs['issue_type'] = issue.fields.issuetype.name;
inputs['project'] = issue.fields.project.name;
if (issue.fields.priority) {
inputs['issue_priority'] = issue.fields.priority.name;
}
if (issue.fields.status) {
inputs['issue_status'] = issue.fields.status.name;
}
The sample payload we received from the Jira documentation contains fields such as:
"priority": "Minor"
instead of
"priority": {
"name": "Minor"
}
and it does not include objects such as:
issue.fields.project
issue.fields.issuetype
issue.fields.status
When I send a payload containing nested objects like:
"project": {
"name": "Test Project"
},
"priority": {
"name": "Medium"
},
"issuetype": {
"name": "Bug"
},
"status": {
"name": "Resolved"
}
the webhook processing proceeds successfully.
My questions are:
Does the OOTB ServiceNow Jira Spoke require these nested objects (project.name, priority.name, status.name, issuetype.name) for all webhook events?
Is the payload shown in the Atlassian documentation only a sample, or does the actual Jira runtime webhook include these objects?
Has anyone faced a similar issue where the OOTB Jira Spoke parser throws "Cannot read property 'name' from undefined"?
Is there any supported way to make the OOTB webhook parser tolerant of missing fields, or is a custom webhook endpoint the recommended approach?
Any guidance would be appreciated.
Thanks!