add new issue with formatted decription through rest api and add smart checklist

Simon Jespersen January 22, 2020

Hi, 

Im a developer and dont have permission to create customefields etc. 

Actually original i wanted to add a smart checklist automatically to my new issues created through rest-api But that doesn't seems to be possible as smart Checklist is an addon not implemented api. 

So instead i wanted to create a user story with my todo list in bullets in description but i keep getting an error when trying to post multiple lines in description. 

 

The body i send through postman 



{
"fields": {
"project": {
"key": "DWH"
},
"issuetype": {
"name": "Story"
},

"summary": "auto created datatask2",

"description": ["Pro:<fil pro and activity number provided>.",
"Tablename:<fill table name>.",
"Table view:<fill table view name>.",
"endpoint:<fill knudepunkt>.",
"Task to do.",
"*Copy attached document to metadata/new folder.",
"* Run job to create the table.",
"* Test the data in Production when ready.",
"* Create extra userstory"],


"assignee": {
"key": "bdmdwhdata",
"name": "bdmdwhdata",
"emailAddress": "dwhdata@bankdata.dk"
},
"labels": ["DATA"]


}
}

The response i get 

{    "errorMessages": [], 

   "errors": {        "description""Operation value must be a string"    }}

 

It works with a single textline in description 

So my questions is, 

1. can i create formatted descriptions in my jira ussues 

2. is it possible to add a smart checklist to an existing issue as it does not seem 

to be possible during creation. 

any suggestions. 

 

 

1 answer

0 votes
Adria Alonso
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 22, 2020

Hello, 

first of all I dont know about that addon, try quoting the desc before the [ and before the la ,

so:

"description": "['Pro:<fil pro and activity number provided>.',
'Tablename:<fill table name>.',
'Table view:<fill table view name>.',
'endpoint:<fill knudepunkt>.',
'Task to do.',
'*Copy attached document to metadata/new folder.',
'* Run job to create the table.',
'* Test the data in Production when ready.',
'* Create extra userstory']",

 I'm pretty sure you have tested it but just in case..

I hope it helps

Simon Jespersen February 13, 2020

i did manage to figure it out 

"description": "h2. Add table description to Erwin \n * tablename:_tabelnavn_ \n * tableview:tabelviewnavn_ \n get document from metadatafolder" ,
Like Adria Alonso likes this
Adria Alonso
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.
February 13, 2020

Glad to hear so, thanks for sharing.

Great job

Suggest an answer

Log in or Sign up to answer