You might find Smart Checklist integration with ScripRunner useful for updating checklists using automated scripts. Below you can find the example of adding a checklist to a Jira Issue by means of updating Issue Property with the key com.railsware.SmartChecklist.checklist.
Note |
---|
Since we use Issue Properties as primary memory storage for checklists, it's required to update Issue Property to have checklists updated with any type of automation. Updating "Checklists" Custom Field won't bring the desired result. |
Example Code
Code Block |
---|
language | groovy |
---|
theme | Midnight |
---|
title | ScriptRunner |
---|
linenumbers | true |
---|
|
def issueKey = 'SAM-8'
def propertyKey = 'com.railsware.SmartChecklist.checklist'
def propertyValue = '"- ToDo List\\n+ Checked\\nx Skipped\\n~ In Progress\\n# Another ToDo List\\n- Unchecked\\n> Quote line 1 https://rw.rw\\n> Quote line 2\\n> Quote line 3\\n"'
def result = put('/rest/api/2/issue/' + issueKey + '/properties/' + propertyKey)
.header('Content-Type', 'application/json')
.body(propertyValue)
.asString()
if (result.status == 204) {
return 'Success'
} else {
return "${result.status}: ${result.body}"
}
|
Result
Insert excerpt |
---|
| Support |
---|
| Support |
---|
nopanel | true |
---|
|