Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can prevent the Jira issue from transition to the next state if not all Smart Checklist items are checked.

Note

Since version, v5.2.0 Smart Checklist add-on doesn’t need “Smart Checklist Progress” field setup

If your Smart Checklist version is lower than v5.2.0 - Follow these instructionsto add the "Smart Checklist Progress" custom field, then proceed to the steps below.

Table of Contents
stylenone

Set up transition validator

  1. Go to Workflows

  2. Choose one that you want to add validation to and click Edit

  3. Choose transition and click on "Validators" link

    1. Image Modified
  4. Add Validator

    1. Image Modified
  5. Choose "Smart Checklist Completed Validator"

    1. Image Modified
  6. Click Add - new Validator will be saved

  7. Then Publish this changed workflow

    1. Image Modified

Check Validator in action

  1. Go to Kanban board (or Issue view)

  2. Try to change the state of an item with opened checklist items

  3. You'll get the error:

    1. Image Modified
  4. If you check all Smart Checklist items - you'll be able to transition the Jira issue successfully!

Tip

If you want to know how to display "Show Checklist progress" on Agile boards read Progress on Agile Board

...

Code Block
def checklist = issue.get("customfield_10113");
if (!checklist) {
  return true;
}
def checklistItems = checklist.split('\n').findAll({ it -> it.matches("^[-|+|~].*")});
for (item in checklistItems) {
  if (!item.startsWith("+") && (item.contains("Code reviewed") || item.contains("Unit tests written and passing"))) {
	return false;
  }
}
return true;
Info
For any questions or feature requests contact us: smartchecklist@railsware.com

Fixing slow Issue transition with validation enabled

Info

The following information could be helpful if the checklist validation is noticeably slowing down the Issue transition.

The validations are essentially based on the following query:

Code Block
languagesql
select  * from "AO_C2A220_ITEM" acai 
	join "AO_C2A220_STATUS" acas on acai."STATUS_ID" = acas."ID"
	join "AO_C2A220_CHECKLIST" acac on acai."CHECKLIST_ID" = acac."ID"
where acac."ENTITY_ID" =1279600 
and acas."STATE" ='CHECKED' 
and acai."IS_CHECKBOX"=true
and acai."MANDATORY"  = true;

Update statistics

In order to assure the performance of that query, the database administrator needs to be sure that correct statistics are present in the database. This can be done with the following SQLs:

PostgreSQL

Code Block
languagesql
ANALYZE "AO_C2A220_ITEM";
ANALYZE "AO_C2A220_STATUS";
ANALYZE "AO_C2A220_CHECKLIST";

MySQL

Code Block
languagesql
ANALYZE TABLE AO_C2A220_ITEM;
ANALYZE TABLE AO_C2A220_STATUS;
ANALYZE TABLE AO_C2A220_CHECKLIST;

Oracle

Code Block
languagesql
DECLARE
  current_schema VARCHAR2(30);
BEGIN
  SELECT USER INTO current_schema FROM DUAL;
  DBMS_STATS.GATHER_TABLE_STATS(current_schema, 'AO_C2A220_ITEM');
END;


DECLARE
  current_schema VARCHAR2(30);
BEGIN
  SELECT USER INTO current_schema FROM DUAL;
  DBMS_STATS.GATHER_TABLE_STATS(current_schema, 'AO_C2A220_STATUS');
END;

DECLARE
  current_schema VARCHAR2(30);
BEGIN
  SELECT USER INTO current_schema FROM DUAL;
  DBMS_STATS.GATHER_TABLE_STATS(current_schema, 'AO_C2A220_CHECKLIST');
END;

Microsoft SQL

Code Block
languagesql
UPDATE STATISTICS AO_C2A220_ITEM;
UPDATE STATISTICS AO_C2A220_STATUS;
UPDATE STATISTICS AO_C2A220_CHECKLIST;

Insert excerpt
Get Started
Get Started
namesupport-email (checklist-server)
nopaneltrue