Automation: "Unable to create request because of these errors: The field 'parent' is not valid for this request type" error in Jira Service Management Cloud

Platform Notice: Cloud Only - This article only applies to Atlassian products on the Cloud platform.

Problem description

When using the Create issue with a request type action in the automation rule, we can't add the Parent field to the action and, when trying to set the field in Additional fields with JSON, the automation rule fails with the message:

Unable to create request because of these errors: The field 'parent' is not valid for this request type '<REQUEST TYPE NAME>'.

Summary

In Jira Service Management, request types support specific fields. Therefore, while we can add the "Parent" field to issue screens, it is not supported by request types. This means that this field cannot be included in the request type forms and used in the "Create issue with a request type" action.

Consequently, in Additional fields, under the action, we can only specify fields that Request types support. To verify which fields have been added to the Request type form and are supported, you can use the following API endpoint:

/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field

You can see more details about this endpoint in the following document:

Solution

Currently, we have three alternatives:

1. We can use the Create issue action to set the Parent field, and after that, a Most recently created issue branch to edit the Request type field:

2. We can use the Create issue with a request type action, and after that, a Most recently created issue branch to edit the Parent field:

3. If your current automation rule is already using a Branch to create the ticket or it's configured to create multiple tickets, it will be necessary to use the Create issue action in the current automation rule to set the Parent field and then, create another automation rule to set the request type field. This new rule would be triggered when an issue is created, and it would check if the Request type field is empty. If it is, the rule would update the Request type field accordingly. In this case, this new automation should be similar to the one shown in the screenshot below:

Since the new rule will be triggered based on another rule, we need to enable the following option under the rule details:

  • Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.

Last modified on Oct 22, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.