Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImaticChecklist

MantisBT plugin that adds a Jira-style checklist section to issue detail pages and enables interactive markdown checkboxes in the issue text fields and bugnotes.

Features

Checklist section on issue detail pages

  • Dedicated checklist row injected directly into the "Details" table — no extra widget, no page clutter
  • Add, delete, and drag-to-reorder items
  • Check/uncheck items with instant AJAX persistence
  • Progress bar and live counter (e.g. 2/5) always visible in the header
  • Assign a user to each item (pulled from the existing "Handler" dropdown on the page); assignment is removable
  • "Clear all" button to wipe the entire checklist at once
  • All UI adapts to the current user's permission level (view-only, toggle-only, or full manage)

Interactive markdown checkboxes

  • Every [ ] / [x] / [X] marker is rendered as a clickable checkbox in the issue description, steps to reproduce, additional information and bugnotes — not only the first marker of a list item, but also several on one line and mid-sentence (e.g. a [x] b [ ] c)
  • Markers inside inline code (`[x]`), fenced/indented code blocks, and link/image syntax ([x](url)) are left untouched
  • Use the WYSIWYG editor's task toolbar button to turn a list into a checklist
  • Clicking saves the change back to the source text via AJAX — no page reload
  • Checkboxes are located through the same commonmark parse the renderer uses (see ImaticFormatting/inc/Checkbox), so the clicked box always maps to the correct source marker; the toggle is cross-checked against the parsed result and refused rather than risk editing the wrong bracket
  • Issue text fields require the update_bug_threshold level; bugnotes require the bugnote author or the update_bugnote_threshold level

The every-marker rendering is provided by the sibling ImaticFormatting plugin, which also ships the commonmark library. ImaticChecklist reuses its parse configuration so the rendered and toggled checkbox sets are guaranteed identical.

Block close if checklist is incomplete

  • Optional config setting (default: off)
  • Prevents resolving or closing an issue while there are unchecked checklist items
  • Uses EVENT_UPDATE_BUG_DATA — fires before the DB write, so the issue status is never incorrectly saved

Requirements

  • MantisBT 2.x
  • PHP 7.4+

Installation

  1. Clone or copy the plugin directory into <mantis>/plugins/ImaticChecklist/
  2. Log in as Administrator → Manage → Plugins → ImaticChecklist → Install
  3. The database table is created automatically

Configuration

Manage → Plugins → ImaticChecklist → Configuration

Setting Default Description
Enabled On Master switch for all plugin features
Toggle threshold Reporter Minimum access level to check/uncheck items
Manage threshold Developer Minimum access level to add, delete, reorder, and assign items
Block close if incomplete Off Prevent resolving/closing an issue with unchecked items

Database

Single table mantis_imatic_checklist_items:

Column Type Description
id INT Primary key
bug_id INT Issue this item belongs to
text VARCHAR(500) Item text
is_checked TINYINT 0 = unchecked, 1 = checked
position INT Drag-and-drop order
assigned_to INT User ID (0 = unassigned)
created_by INT User who added the item
created_at INT Unix timestamp
updated_at INT Unix timestamp

File structure

ImaticChecklist/
├── ImaticChecklist.php          # Plugin class, schema, hooks
├── files/
│   ├── checklist.js             # All frontend logic (vanilla JS, no dependencies)
│   └── checklist.css            # Styles
├── inc/
│   ├── checklist_view.php       # PHP template (hidden carrier, moved into DOM by JS)
│   └── CheckboxToggler.php      # AST-based markdown checkbox locator/toggler (no Mantis dep)
├── lang/
│   └── strings_english.txt      # Translatable strings
├── pages/
│   ├── ajax_checklist.php       # AJAX endpoint (add, toggle, delete, reorder, assign, text/bugnote CB)
│   └── config.php               # Admin configuration page
└── tests/
    └── checkbox_toggle_test.php # Standalone test for CheckboxToggler (php tests/checkbox_toggle_test.php)

Testing

The checkbox locator/toggler has no Mantis dependency and is covered by a standalone test:

php plugins/ImaticChecklist/tests/checkbox_toggle_test.php

It validates against the real commonmark renderer that the located checkbox count, order, and state match the rendered DOM — and that toggling the n-th checkbox flips exactly the n-th rendered box — across 22 markdown edge cases.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages