Forums

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

Need to create a checklist for in the jira ticket.

rohit.maheshwari August 21, 2019
{  
   "fields":{  
      "project":{  
         "id":"10011"
      },
      "summary":"Another Test Story.",
      "customfield_10057":{  
         "value":"Technical"
      },
      "customfield_10006":"CB2323",
      "customfield_10053":"this must be done before closing of ticket",
      "customfield_10146": [
      {
        "items": [
          {
            "text": "rabbitmq-1",
            "checked": false
          },
          {
            "text": "rabbitmq-2",
            "checked": false
          }
        ]
      }
    ],
      "description":"Creating of a story with the API",
      "issuetype":{  
         "name":"Story"
      }
   }
}

 

I am getting this error. It works fine when I remove customfield_10146. Don't know what I am doing wrong here.

{"errorMessages":[],"errors":{"customfield_10146":"Field 'customfield_10146' cannot be set. It is not on the appropriate screen, or unknown."}} 

4 answers

1 accepted

0 votes
Answer accepted
Jack Hunter _HeroCoders_
Atlassian Partner
August 21, 2019

Hello @rohit.maheshwari ,

The YAML in the checklist custom field suggests that you are using Issue Checklist Pro or Issue Checklist Free

I can confirm the solution you found, i.e. the custom field value must be enclosed with double-quotes. 

More examples and explanation can be found in the documentation: https://gebsun-support.atlassian.net/wiki/spaces/IC/pages/791806047/Change+checklist+via+REST+API

Let us know if you have more questions.

Cheers,
Jack

0 votes
rohit.maheshwari August 21, 2019

worked for me now. I had to do something like this.

 

{
"fields":{
"project":{
"id":"10011"
},
"summary":"Another Test Story.",
"customfield_10057":{
"value":"Technical"
},
"customfield_10006":"CB2323",
"customfield_10053":"this must be done before closing of ticket",
"customfield_10146":"items:\n - text: test-1\n checked: false\n - text: test-2\n checked: false\n",
"description":"Creating of a story with the API",
"issuetype":{
"name":"Story"
}
}
}

DPKJ
Community Champion
August 21, 2019

Happy hacking.

0 votes
rohit.maheshwari August 21, 2019

.

0 votes
DPKJ
Community Champion
August 21, 2019

Have you checked if your custom field is visible on 'Issue Create Screen'?

If not, make it visible there for Project 10011 and Issue Type 'Story'.

rohit.maheshwari August 21, 2019

Thanks for your quick response.

 

Yes, I can see the custom field on the issue create screen like this.

 

  • customfield_10146: "items: - text: rabbitmq-1 checked: false - text: rabbitmq-2 checked: false ",

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events