Apply Template using automation/integration tools

Add Smart Checklist Templates to your issues via different tools available in Jira - ScripRunner for Jira, Automation for Jira, JMWE.

 

Contents 👇🏼

Steps on how to apply the Smart Checklist Template via Automation for Jira

💡HINT: This is just an example of a use case with Issue created trigger. You can select any other available trigger based on your needs.

  1. Create a personal access token

    1. Navigate to User icon → Profile → Personal Access Tokens → Create Token

      image-20240212-154345.png
    2. Copy token value

  2. Go to Project Settings → Project Automation → click Create rule: (or go to Administration → System → Automation rules → click Create rule: )

    image-20240212-154212.png

     

  3. Create a trigger

    1. Choose Issue created

    2. Save

       

  4. Add component - New action

     

    1. Choose Send web request as the first action.

    2. Fill in the fields with the following values:

Webhook URL

http://Jira_base_URL/rest/railsware/1.0/checklist?issueKey={{issue.key}}

Webhook URL

http://Jira_base_URL/rest/railsware/1.0/checklist?issueKey={{issue.key}}

Headers

Header Name: Authorization
Header Value: Bearer <token> (replace <token> with the token obtained in Step 1)

Example: Bearer NDQ51zY0NzQ4NjUz...GdnIjoZbDOvd6TVslhWXJX

HTTP method

GET

Webhook body

Empty

Wait for Response

Check this option

c. Save

  1. Add component - New action

     

    1. Choose Send web request as the second action

    2. Fill in the fields with the following values:

Webhook URL

http://Jira_base_URL/rest/railsware/1.0/checklist/{{webhookResponse.body.checklists.get(0).checklistId}}/template/${templateId}

Where ${templateId} should be replaced by the actual Smart Checklist template id

Webhook URL

Where ${templateId} should be replaced by the actual Smart Checklist template id

Headers

 

Authorization

Bearer + token (mentioned in step 1)

HTTP method

POST

Webhook body

Empty

Wait for Response

Don’t check this option

☝🏼NOTE: You can find the Template ID by going to Issue → Smart Checklist → 3 dots menu → Manage Templates → Expand the Template you are looking for → Copy the Template ID ✅

Or going to Jira Administration → Manage apps → Smart Checklist Settings → Templates tab → Find needed template → Click on the Template you are looking for → Copy the Template ID ✅

Check out more about Templates IDs here →Use Templates in Automation tools

c. Save

  1. Name your new Automation and Turn it on

You're done! Now every time an issue is created, the proper template will be added to your Smart Checklist 🎉

Steps on how to apply the Smart Checklist template via ScriptRunner

  1. Go to Jira Administration → ScriptRunner → Console

  2. Add the following script:

Where testIssueKey and templateId should be changed accordingly.

  1. Click Run

Steps on how to apply the Smart Checklist template via JMWE

  1. Navigate to Jira Administration → Manage apps → Jira Misc Workflow Extensions Settings → Select Groovy console

  2. Add the following script:

Where testIssueKey and templateId should be changed accordingly.

  1. Click the Test Groovy script button

  2. Enter Issue Key where you want to apply template → Click Test

  3. You will see a message 🚀

 

 

 

Related pages