Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

update does not work for description just like in example

Tomasz Sabramowicz
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!
June 4, 2024

I try to update the issue description field using this EXAMPLE that is in official Atlassian documentation but it gives me error that "update" cannot be used for description.

 

I try different options but it does now update my description but overwrites it.

 

Can anyone tell me what is not right here?

image.png

if this is official example why it does not work with the "update" statement ?

2 answers

1 vote
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2024

Hi Tomasz and welcome to the Atlassian community!

I found an old bug report for Jira server/ data center and I think it is applicable for Cloud too. See this comment: https://jira.atlassian.com/browse/JIRAAUTOSERVER-190?focusedId=2619480&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2619480

Can you try with this code?

    "update": {
        "description": [{
            "set": "a new description"
        }],
        "labels": [{
                "add": "test-label"
        }]
    },
    "fields": {
        "summary": "woohoo! a new summary"
    }
}
0 votes
Kalyan Sattaluri
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.
June 4, 2024

hello @Tomasz Sabramowicz 

If you mean this LINK where you got your example, then that link does need updates for certain fields.

Please look at the official API docs: LINK

Especially this blurb: "Note that the descriptionenvironment, and any textarea type custom fields (multi-line text fields) take Atlassian Document Format content."

what this mean is, if you need update description, the JSON to use:

{
    "fields": {
        "description": {
            "type": "doc",
            "version": 1,
            "content": [
                {
                    "type": "paragraph",
                    "content": [
                        {
                            "type": "text",
                            "text": "add your description here"
                        }
                    ]
                }
            ]
        }
    }
}

 

 

Suggest an answer

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

Atlassian Community Events