I am able to create the issue successfully but Epic Link which is a custom field is not set
api : https://track-api.com/jira/rest/api/2/issue
issue Post Data
{'fields': {'summary': 'summary', 'issuetype': {'self': 'https://track-api.com/jira/rest/api/2/issuetype/12200', 'id': '12200', 'description': '', 'name': 'Service Entitlement', 'subtask': False, 'avatarId': 17100}, 'customfield_17002': {'self': 'https://track-api.com/jira/rest/api/2/customFieldOption/18265', 'value': 'False', 'id': '18265'}, 'description': 'decription', 'project': {'self': 'https://track-api.com/jira/rest/api/2/project/25400', 'id': '25400', 'key': 'TESTPREM3', 'name': 'Test Premium3 Premium Health check', 'customfield_16900': {'self': 'https://track-api.com/jira/rest/api/2/customFieldOption/18260', 'value': 'Premium 3.0', 'id': '18260'}, 'customfield_10903': 'TESTPREM3-126'}}
customfield_10903( Epic Link)
You should use Jira software API for it POST /rest/agile/1.0/epic/{epicIdOrKey}/issue. You can find more info here:
https://docs.atlassian.com/jira-software/REST/7.3.1/#agile/1.0/epic-moveIssuesToEpic
Thanks @Alexey Matveev for sharing this, I am a bit surprised that setting the epic link is not supported via normal REST API (fields element updating custom field) as there is not much info about it based on the error here -https://jira.atlassian.com/browse/JSWSERVER-7017
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @nik1989
What is the error you see in the response, is the issue created successfully but without the epic link?
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.
Is the epic link field available on the edit screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Strange, could you try doing it on the PUT request as shared by @Alexey Matveev , thus once the issue is created then in the response you should have the issue key and then do a PUT request to update epic link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
tried that , but response is 404
url : https://track-api.com/rest/agile/1.0/epic/TESTPREM3-126/issue
data: {'issues': ['TESTPREM3-133']}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
404 means - Returned if the epic does not exist or the user does not have permission to view it.
But that doesn't seem to be the case in your scenario as it's the same project. Your request was Put or POST?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What's your rest client, could you try the request with couple of different REST clients and see if the error is same, as it could be that you are running into a bug and might need to reach out to Atlassian support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I am also getting same error 404.
my URL is https://jira2.cerner.com/rest/api/2/epic/DEVACDMY-14837/issue
and data is :
{
"fields":{
"summary":"Summary",
"issuetype":{
"name":"Story"
},
"project":{
"key":"DEVACDMY"
},
"description":"Creating the jira for testing"
}
}
And I am using postman for raising the request
Please help me
Thank You
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.