You can change the values of Smart Checklist via Jira REST API by accessing "
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Tip |
---|
You can use Jira REST API to work with the checklists ⚡️ |
📖 Overview
You can read/write checklists by accessing any of checklist storage:
Use Checklists Custom Field. Read more about custom fields setup here → "Checklists" Custom Field set up
Use
com.railsware.SmartChecklist.checklist
...
Refer to Rest API documentation https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-issue-issueIdOrKey-properties-propertyKey-put
Cloud
Issue Property which is immediately available upon addon setup
🔒 Authentication
Get your API token from https://id.atlassian.com/manage/api-tokens check .
Check out instructions :here → https://confluence.atlassian.com/cloud/api-tokens-938839638.html
Then use the following approach
...
.
Using com.railsware.SmartChecklist.checklist
issue property:
🔗 Jira API reference
Set the checklist
Code Block |
---|
curl --location --request PUT \ --url 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/properties/com.railsware.SmartChecklist.checklist' \ --user 'email@example.com:<api_token>' \ --header 'Authorization: Bearer ' \ --header header 'Accept: application/json' \ --data '"- ToDo List\n+ Checked\nx Skipped\n~ In Progress\n"' |
Get the checklist
Code Block |
---|
curl --request GET \
--url 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/properties/com.railsware.SmartChecklist.checklist' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \ |
Using Checklists custom field
🔗 Jira API reference
Panel | ||
---|---|---|
| ||
☝🏼NOTE: |
Set the checklist
Code Block |
---|
curl --request PUT --header \ --url 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "fields": { "customfield_10001": "- ToDo List\n+ Checked\nx Skipped\n~ In Progress\n" } }' |
Get the checklist
Code Block |
---|
curl --request GET \
--url 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' |
Info |
---|
Check an example implementation with ScriptRunner for Jira (Cloud) |
Hope everything works for you! 🚀
Insert excerpt | |||||||||
---|---|---|---|---|---|---|---|---|---|
|