REST API creating issue with missing mapped fields

Aslam Mohammed November 5, 2024

Hi,

 

I am using REST API to create a JIRA issue and the issue is getting created successfully.

However, one of the custom fields (short text) is not updated although the request body has the value to be set to this field (highlighted).

There is no error or failures shown on the POST request.

 

 

{
  "fields": {
    "project": {
      "key""ABCD"
    },
    "summary""Summary 05111637",
    "description": {
      "type""doc",
      "version"1,
      "content": [
        {
          "type""paragraph",
          "content": [
            {
              "type""text",
              "text""test description"
            }
          ]
        }
      ]
    },
    "issuetype": {
      "name""Epic"
    },
    "reporter": {
      "id""xxxxxxx"
    },
    "customfield_10928": [
      {
        "value""BIL"
      }
    ],
    "customfield_11605": [
      {
        "value": "New Code not mapping"
      }
    ],
    "customfield_11582": [
      {
        "value""Nominal Ledger Code"
      },
      {
        "value""Analysis Code"
      }
    ]
  }
}
I've checked everything and the field is present in the Create/ Edit and View screens of the issue.

2 answers

1 vote
Bill Sheboy
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.
November 5, 2024

Hi @Aslam Mohammed 

As you describe a Short Text field, which uses plain text, have you tried this expression:

"customfield_11605": "New Code not mapping"

Kind regards,
Bill

0 votes
Marc - Devoteam
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.
November 5, 2024

Hi @Aslam Mohammed 

Welcome to the community.

How is the context of the custom field set, it might be that the field is not available to the project?

Aslam Mohammed November 5, 2024

The field is available in the project and set on the "Create"/ "Edit" and "View" screens.

Marc - Devoteam
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.
November 5, 2024

Hi @Aslam Mohammed 

So is the field visible in the GUI on an issue in the project and can you set it via the GUI?

Aslam Mohammed November 5, 2024

Hi @Marc - Devoteam that's correct. The field is visible on the GUI in the project and can be set correctly.

Suggest an answer

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

Atlassian Community Events