Alternative way to clone checklist

 

 

Clone you Issues with the Smart Checklist content ⚡️

 

Typically, checklist items are cloned when an issue is cloned, by reacting to the Issue Created event. However, there are some situations where this event should not be triggered during the Create transition due to specific project requirements.

In such cases the Issue Created event does not trigger and our standard cloning mechanism is not copying the checklist, causing disruptions in task management and project workflows. To ensure smooth operations for such scenarios, we have an alternative method based on issue links.

Cloning Checklists via Issue Links

For situations where the Issue Created event does not trigger, we’ve introduced a backup method that listens for the creation of an issue link of type that can be configured, in most common cases it is "Cloners" type. When an issue is cloned and a "Cloners" link is created between the original issue and the cloned issue, this triggers the cloning of the checklist.

To enable this flow, we need to add the following Jira project property:

'com.railsware.SmartChecklist': { "checklistCloningLinkedType": "Cloners" }

  • Issue Link Type: The value for checklistCloningLinkedType must match the name of the issue link type that signifies a cloned issue. By default, this is "Cloners," but it can be customised based on your specific configuration of the Jira instance.

  • Automatic Triggering: Once the project property is correctly set, Smart Checklist will automatically clone checklists when the "Cloners" link (or its custom equivalent) is created, ensuring that cloned issues have an identical checklist to the original issue.

When Should You Use the Alternative Method?

This cloning method should be used only if your Jira instance has a custom workflow where the Issue Created event is not triggered during the cloning of a Jira issue. As a result, your checklist is not copied when the issue is cloned.

How to add Jira project property

To enable the alternative checklist cloning method in your Jira project, you need to add a Project Property. There are two ways to do this:

1. Use the Entity Property Tool for Jira

The easiest method is to use the Entity Property Tool for Jira, which allows you to manage project properties directly from the Jira interface without needing to write code. You can install and use this app from the Atlassian Marketplace, and it provides a UI to add, edit, or remove project properties.

2. Add Project Property via the Jira REST API

You can also add the property by using the Jira REST API. Below is an example of how to add a project property using a curl command:

curl --request PUT \ --url 'https://your-domain.atlassian.net/rest/api/2/project/{projectIdOrKey}/properties/{propertyKey}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "checklistCloningLinkedType": "Cloners" }'

In this example:

  • Replace {projectIdOrKey} with your actual Jira project ID or key.

  • Replace {propertyKey} with com.railsware.SmartChecklist.

  • Update the user credentials with your Atlassian email and API token.

This request will add or update the project property com.railsware.SmartChecklist with the checklistCloningLinkedType set to "Cloners."

By following one of these methods, you can ensure that your Smart Checklist plugin will listen for issue link creation and clone checklists accordingly.