Is there a way to address customfield_xxxx by it's name when creating/updating issues?

sadsa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 23, 2019

Hi, is there a way to address customfield_xxxx by it's name?

Example: Right now I'm creating issues like this:

{
  "fields": {
    "summary": "summary",
    "issuetype": {
      "name": "Incident"
    },
    "priority": {
      "id": "10000"
    },
    "description": "description",
    "project": {
      "key": "IM"
    },
    "reporter": {
      "name": "_tibco"
    },
    "customfield_10144": "Bill Gates",  
  }
}

and I know customfield_10144 is called "Your name"

{
      "id": "customfield_10144",
      "name": "Your name",
      "custom": true,
      "orderable": true,
      "navigable": true,
      "searchable": true,
      "clauseNames":       [
         "cf[10144]",
         "Your name"
      ],
      "schema":       {
         "type": "string",
         "custom": "com.atlassian.jira.plugin.system.customfieldtypes:textfield",
         "customId": 10144
      }
   }

 

Is it possible to use something like

"Your name": "Bill Gates"

 instead of

"customfield_10144": "Bill Gates"

?

 

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted
josh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2019

Hi,

This isn't possible - as the customfield_#### syntax is required by the API.

You could use the /createmeta or /editmeta endpoints in your script to identify the right ID based on the field name (or the reverse). 

https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#getting-metadata-for-creating-issues-examples

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events