// Replace Demo below with the ID of your projectdefprojectKey='Demo'deftaskType=get('/rest/api/2/issuetype').asObject(List).body.find{it['name']=='Task'}['id']post('/rest/api/2/issue').header('Content-Type','application/json').body([fields:[summary:'Task Summary',description:"Don't forget to do this!.",// Replace customfield_12345 with the ID of your custom labels field belowcustomfield_12345:["ALabel"],project:[key:projectKey],issuetype:[id:taskType]]]).asString().body
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.