Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update the fields like Epic Link or Label while creating an Issue via REST API?

Venkat Mavillapalli August 23, 2023

I'm trying to create an issue and sending the following JSON

 

{

    "fields": {

       "project":

       {

          "key""Key1"

       },

       "summary""Test summary",

       "description""Hello, this is DEC field",

       "issuetype": {

          "name""Bug"

       },

       "customfield_10002": { "name""Support" }

   }

}
But, I get the following error
{

    "errorMessages": [],

    "errors": {

        "customfield_10002""Field 'customfield_10002' cannot be set. It is not on the appropriate screen, or unknown."

    }

}

 

First of all, is it possible to update the fields like Epic Link along with creating an issue? If yes, then what's wrong with the above request JSON?

1 answer

1 accepted

1 vote
Answer accepted
Kian Stack Mumo Systems
Community Champion
August 23, 2023

@Venkat Mavillapalli

 

Based on what you are showing, there are two issues I see:

 

  1. The format of the Epic link is incorrect. When I get mine to create, I have to pass it the issue key as follows: "customfield_10014": "SSP-56"
  2. The other issue is that it doesn't appear that the Epic Link field is visible on the screen for the project/issue type you are trying to create the issue as indicated by the error message you are receiving.
Venkat Mavillapalli August 23, 2023

1. I didn't get how you suggest me to pass the data? Can you use my JSON as example and tell me please?

2. I could create an issue manually via web page and it does show me the Epic Link to select from the drop down on the same page

Kian Stack Mumo Systems
Community Champion
August 23, 2023
{

    "fields": {

       "project":

       {

          "key""Key1"

       },

       "summary""Test summary",

       "description""Hello, this is DEC field",

       "issuetype": {

          "name""Bug"

       },

       "customfield_10002""<EPIC ISSUE KEY HERE>"

   }

}

If you can create an Issue with the Epic link, then your ID of customfield_10002 must be wrong. How did you get the ID?


Thanks,

Kian

Venkat Mavillapalli August 23, 2023

You're right, the field ID was wrong. Now, I'm using the following URL to get the right ID.

Also, I should send the ID for the epic link.

Thanks for pointing me in the right direction

 

https://abc.atlassian.net/rest/api/latest/field

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events