Hi,
We are using JIRA REST to add issues, stories and epics to JIRA.
I'am able to add Issues to JIRA, but not stories and epics.
String for creating issues is:
"{\"fields\": {\"project\":{ \"key\": \"TEST\" }, \"summary\": \"REST 01.\", \"description\": \"Creating of an issue\", \"issuetype\": { \"name\": \"Bug\"} } }"
Who has some examples for creating stories and epics?
Thanks,
Egbert
Community moderators have prevented the ability to post new answers.
Hi guys, thanks for the answers.
I've used the following json strings and they work fine for me:
Create a Story:
{"fields":{"project":{"key": "TEST"},"summary": "Story01","description": "Create a Story via REST","issuetype": {"name": "Story"}}}
Create an Epic:
{"fields":{"project":{"key": "TEST"},"customfield_10401": "Epic Name 01","summary": "REST EXAMPLE1","description": "Creating an Epic via REST","issuetype": {"name": "Epic"}}}
customfield_10401 can be different on another JIRA installation.
Hi Egbert ,
""" Create an Epic:
{"fields":{"project":{"key": "TEST"},"customfield_10401": "Epic Name 01","summary": "REST EXAMPLE1","description": "Creating an Epic via REST","issuetype": {"name": "Epic"}}}"""
Nice of Creating an epic but i have a doubt that i need to create a story to which epic i have created in epic with epic link.
epic link is required to create a story in which we have created the epic.
Thank u.
please rly fast...
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.
I created an issue and linked to the right epic by following below query
dataToPost='{"fields": {"project": {"key": "WDP1234"}, "summary":"REST ye merry gentlemen.", "description":"Creating of an issue using project keys and issue type names u", "issuetype":{"name": "Task"}, "customfield_10001": "WDPUIQC-1"}}'
## customfield_10001 is my epic id
## printf '%s\n' "$dataToPost"
issue=$(curl -D- -kv -u charlie:charlie \
-X POST -H "X-Atlassian-Token: nocheck" --data "$dataToPost" \
-H "Content-Type: application/json" \
https://jira.hostname.com.au/rest/api/2/issue/
)
echo "$issue"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Best guess is that you don't have "bug" or "story" as issue types in the target project. Check the issue type scheme.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Egbert,
Please try to pass id of issuetype:
"issuetype": { "id": "10000" },
you can get full list of available issuetypes via /rest/api/2/issuetype
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.