When trying to create an Epic issue in Jira, I receive the following error response:
HTTP 400 Bad Request
{"errorMessages":["You must select Parent for created Issue"],"errors":{}}
The issue type I’m creating is Epic, and I’m not specifying any parent field, since Epics normally shouldn’t have a parent issue.
Could anyone please help me understand:
Is there any configuration or issue type hierarchy change that could cause this behavior?
How can I create an Epic successfully through the API without providing a parent?
Thanks in advance for your help!
Welcome to the community.
As @Duc Thang TRAN mentions, the parent field is mandatory on creating an Epic.
Your call you are making in the API doesn't contain a value for the field Parent.
The reason why you get this message is related to the create condition on the workflow or related to the Field Configuration, used in the Field Configuration scheme used by the project.
The parent field is then set to required in the Field Configuration that is used by the work item Epic.
Hello @ibtissem cherni
I think this error occurs because the parent field of your issue type is required when creating the ticket (either on the create screen or during the workflow transition validation).
For me it come from a workflow condition, perhaps your Epic shares the same workflow with another standard issue type that requires a parent during creation.
BR,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for your reply!
Just to clarify — we have an integration with Jira Cloud, and we’re creating issues using the following mapping:
{
"fields": {
"summary": "[CALM Feature] #{title}",
"issuetype": { "name": "Epic" },
"project": { "key": "..." }
}
}
Since the issue type is Epic, should we explicitly add a "parent" field in the mapping?
Or are there any configuration steps or documentation to correctly set up Epic creation and its parent relationship in Jira Cloud?
Thanks again for your help and guidance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suggest going to Space settings → Workflows to check if the Epic workflow
IF you have permission to edit the workflow, open the Epic’s workflow and review the "Create" transition to see if there's a rule that requires the "parent" field to be specified -> that’s probably where the problem comes from.
Eg :
Beware to avoid impacting if other issue types that use the same workflow, it's best to clone the workflow, assign the clone to Epic, and then remove the validate details from the new workflow.
Since the issue type is Epic, should we explicitly add a "parent" field in the mapping? ->
For me, if you don’t have any level higher than Epic, it’s not necessary.
Without seeing your project configuration, I can’t be sure, but I think the Epic workflow configuration is shared with other issue types that require the "parent" field as mandatory.
Hope this can help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.