Forums

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

Trying to add a checkbox item in description via the API

Sofiane Az.
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 14, 2025

 

 

$description = array(
        "type" => "doc",
        "version" => 1,
        "content" => array(
            array(
                "type" => "paragraph",
                "content" => array(
                    array(
                        "type" => "text",
                        "text" => "hello \n - {todo} {task} {} [open] to do"
                    ),
                )
            )
        )
    );
    $dataUser = array(
        "fields" => array(
            "description" => $description  
        )
    );

Every kind of markdown isnot interpreted by the description field, the one I am tring to add is the task item which makes a checkbox. 

2 answers

1 vote
Darryl Lee
Community Champion
January 14, 2025

Hi - it looks like you're talking about the new Action Items in Jira.

You are correct that markdown is not supported for adding checkboxes ("action items") via the API, Automation, etc.

I haven't tried using the API to add tasks, but looking at the API v3 Get issue endpoint you can see how Action Items (checklist) data is stored in the Description field, with a new content type, taskList that contains and array of taskItems. Example here.

@Sunny Ape found that you don't need to specify a valid localId parameter, so you should be able to start with his example here.

0 votes
Angela Thomas_Seibert Group
Atlassian Partner
January 14, 2025

EDITED: If you review the comments on the original post, you'll notice that other users like yourself have highlighted limitations after the Jira action items roll-out.

 

Darryl Lee
Community Champion
January 14, 2025

@Angela Thomas_Seibert Group while I appreciate that you want to sell your plug-in, the original question was about "Trying to add a checkbox item in description via the API".

The example code that @Sofiane Az. indicates he's using the API, not Automation, and as I've mentioned and @Sunny Ape has TESTED, adding/creating action items via API does work.

I guess you could argue that it is "not supported" because Atlassian has not provided documentation, etc.

But that feels a little disingenuous.

Angela Thomas_Seibert Group
Atlassian Partner
January 14, 2025

@Darryl Lee  Thank you for sharing your insights and fact-checking the details! I truly appreciate it. That's what makes this community so great—collaborating and learning from each other. 😊 I'll update the answer and guide accordingly. 

Suggest an answer

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

Atlassian Community Events