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 πŸš€

Β 

Β 

Β