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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,331
Community Members
 
Community Events
176
Community Groups

rest api to create sub task error out Operation value must be an Atlassian Document (see the Atlassi

Hi, 

I am able to create jira issue (issue type = story) using api. 

and then I follow this instruction to create sub-task. 
I feel the json is correct. but it gave me error message: Operation value must be an Atlassian Document (see the Atlassian Document Format)"

 

 

 

{
    "fields":
    {
        "project":
        {
            "key""WDEXTEND"
        },
        "parent":
        {
            "key""WDEXTEND-24"
        },
        "summary""Sub-task of TEST-101",
        "description""Don't forget to do this too.",
        "issuetype":
        {
            "_id""5",
            "name":"Sub-Task"
        }
    }
}

 

2 answers

1 accepted

1 vote
Answer accepted
Hana Kučerová Community Leader Mar 20, 2022

Hi @John Sheng ,

please, which REST API endpoint are you using? Which instructions are you following? Thank you.

Hana Kučerová Community Leader Mar 21, 2022

Hi @John Sheng , please try something like this:

{
"fields": {
"summary": "Sub-task of TEST-101",
"issuetype": {
"id": "5"
},
"project": {
"key": "WDEXTEND"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Don't forget to do this too.",
"type": "text"
}
]
}
]
},
"parent": {
"key": "WDEXTEND-24"
}
}
}

If you are using v3 of REST API, description field needs to have different format, see here.

Thank you so much. it works perfect!

John

Works for me also, Thank you @Hana Kučerová 

Like Hana Kučerová likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events