Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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. 

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


ScriptRunner
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


Error rendering macro 'excerpt-include' : No link could be created for 'Support'.


  • No labels