PITS
Description
The PmWiki Issue Tracking System.
This is the recipe which helps us manage the PITS listings but can be used as a generic issue tracking system.
Installation
Get PITS.phpΔ and place it in your pmwiki/cookbook directory. Then add to your local/Group.php file such a line:
include_once("$FarmD
/cookbook/PITS.php");
You can enable PITS in any WikiGroup.
Usage
The following markups are enabled:
(:pitsform:)
- Display a form to allow a new issue to be entered into the system
(:pits2list:)
- Display a list of issues according to various criteria; the PITS pages are scanned once and their attributes are cached, you can have more than one list in a page; new format of priority sorting
(:pitslist:)
- Display a list of issues according to various criteria (older format)
Implementing (:pitsform:)
and (:pits2list:)
is quite simple and pmwiki.org has some very good examples.
You can copy the source text from PITS.PITS (source) and PITS.NewIssue (source) and paste the contents to your own pages. Then select the different links on that main PITS page to other PITS pages and do the same modifying them to suit your purposes.
These examples are especially beneficial when utilizing (:pits2list:)
as it needs to have parameters passed to display in specific manner(s).
See also PITS.PITSList (source) for a listing using a PageList.
Comments and further questions should be added on the talk page, sent to pmwiki-users or added as issues in PITS itself.
This section can be further expanded.
Configuration
You can change the following variables in your pmwiki/local/Group.php file
$EnablePITSAuth = 1;
If enabled, the listings will respect any read permissions set in individual pages (slightly slower). If not enabled, the listings will display the summary, status and other fields of the entry, even if the visitor cannot open and read the page of the entry.$PitsCategories = array('', 'Bug', 'Feature' => 'Feature/Change Request', 'Documentation', 'Cookbook', 'CoreCandidate','PHP Compatibility', 'Other');
- to change the default categories$AutoSuspendDaysInactive = 60;
Mark pages as inactive if they haven't been edited for a number of days (default 180, about 6 months).$PriorityMinVotes = 3;
default: 4; the minimum number of votes that enables the entry to have a "priority" field calculated and used for sorting (used in(:pits2list:)
only)
Notes
To make the listings filterable, with the Filterable extension configuration, add the query selector "div.pits-filterable", for example:
ul.filterable, table.filterable, div.pits-filterable
Change log / Release notes
- 20240518 - update to enable filterable listings.
- 20220605 - workaround for deprecated create_function() in recent PHP versions (reported by Said Achmiz), update for PHP 8. Note, this version requires PmWiki 2.3.1 or more recent.
- 20170704 - remove unneeded duplicate JS line, fix local variable definition.
- 20170628 - fix wrong issue number when a non-issue page starts with a number like 50RecentChanges (PITS:01415).
- 20170624a - fix comparison replacement scope.
- 20170624 - Add JavaScript version comparison and a message if reported version is not the latest (PITS:01412).
- 20170623 - Update for compatibility with PHP 7.2. Align the Submit button with the other elements.
- 20140103 - Fix international characters in listings (PITS:01331).
- 20140101 - Update for compatibility with PHP 5.5.
- 20131129 - The recipe can now work in any group. Added $EnablePITSAuth.
The recipe has been in production usage on pmwiki.org/wiki/PITS for nearly 10 years.
See also
- Cookbook /
- PITS-Community Generic PmWiki Issue Tracking System ("pits")
Contributors
- Pm is the author of the original recipe.
- Petko is the maintainer since 2009, and wrote the second half of the script with the new-style listings, priorities, and the internal cache.
Comments
See discussion at PITS-Talk
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.