Hi,
I am able to create an Epic using REST api. But unable to create issue under the created EPIC? How do i do this?
EPIC: [Success]
POST : /rest/api/2/issue
Request:
{
"fields": {
"project":{"key": "JIRA PROJECT"},
"summary": "Customer : Customer Name",
"description": "[TEST] : Creating of an issue using project keys and issue type names using the REST API",
"issuetype": {"name": "Epic"},
"customfield_10008": "Customer : Customer Name"
}
}
Issue: [Failed]
POST : /rest/api/2/issuetype
Request:
{
"fields":{
"project":{"key": "JIRA PROJECT"},
"parent": {"key": "JIRA PROJECT-1336"},
"summary": "Application Name: Customer Name",
"description": "Don't forget to do this too.",
"issuetype": {"name": "Project"}
}
}
Exception:
{ "errorMessages": [ "Unrecognized field \"fields\" (Class com.atlassian.jira.issue.fields.rest.json.beans.IssueTypeCreateBean), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@344973c6; line: 3, column: 6] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.IssueTypeCreateBean[\"fields\"])" ]}
Also if i change the URI to /rest/api/2/issue then i get a different exception:
{ "errorMessages": [], "errors": { "issuetype": "Issue type 11100 is not a sub-task but a parent is specified." }}
1. Why is that i am able to create the an issue under Epic using the user interface but not via the REST api?
2. Is this a permission issue or am i doing something wrong. I couldn't figure out. I got the full access for the project to create any type of ticket.
Please let me know.
Thank you,
Vijay
Issue in epic are not considered subtasks of epic
Jira has a Customfield named Epic Link
If you would like to create an issue under an epic, the child issue of the epic should have epic link custom field value with the epic key
Note, Parent is only used for creating subtakss
Hi @Najjar _Innovura_ ,
Would you be able to share a simple example on how to do this?
Thank you,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
curl --location --request POST 'http://localhost:2990/jira/rest/api/2/issue' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Content-Type: application/json' \
--data-raw '{
"fields": {
"project": {
"id": "10000"
},
"summary": "something'\''s wrong",
"issuetype": {
"id": "10000"
},
"assignee": {
"name": "admin"
},
"customfield_10102": "JIRA-41"
}
}'
In my jira instance custom field "Epic Link" id is 10102
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Najjar _Innovura_ . Apparently the customfield can differ is what i found based on this link here
What i received using the REST call is that "Epic Link" in my implementation is "customfield_10007"
URI: /rest/api/2/field
Response Snippet:
{
"id": "customfield_10007",
"key": "customfield_10007",
"name": "Epic Link",
"untranslatedName": "Epic Link",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[10007]",
"Epic Link"
],
"schema": {
"type": "any",
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 10007
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes epic link defers from instance to instance. your json should look like this:
"fields": {
"project": {
"id": "10000"
},
"summary": "something'\''s wrong",
"issuetype": {
"id": "10000"
},
"assignee": {
"name": "admin"
},
"customfield_10007": "EPIC_KEY_HERE"
}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Najjar _Innovura_ hi, i am trying same, but i get this error
"Field 'customfield_10014' cannot be set. It is not on the appropriate screen, or unknown."
can you help me with this? thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same as above:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where is the answer to this question? Why are you deleting answers in this forum?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jack Brickey Do you happen to know Where the answers and discussions on this topic have been moved to? Why am i unable to see the previous discussion?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vijay Gopu , No answers have been deleted. There was an issue with the application that should be fixed at this point.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.