mtrack: custom fields, snippets

It's time for another mtrack update; here's what's new:

  • Add "Snippets" feature; works like pastebin, but allows for comments to be supplied in wiki syntax in addition to the code or text snippet that you're pasting
  • Add Custom Field support. This is implemented by modifying the schema (custom fields always have an "x_" prefix).
  • Improvements to the "custom ticket query" screens, including ability to select which columns (including custom fields) are included in the results
  • Fix an issue with sorting the "Remaining" time column
  • Fix some IE compatibility issues
  • Improve presentation of tickets in read-only mode
  • Refactor search engine code and allow the use of Apache Solr as an engine. Indexer logs are now viewable in the Admin section
  • Improve perceived search engine performance by forcing it to work in smaller batches
  • You may now delete attachments from both wiki pages and tickets
  • Add post commit hook for the wiki repo, so that changes made outside of the mtrack UI are noticed and indexed
  • Improve diff visualization
  • Add syntax highlighting facility
  • File view now allows blame and line numbers to be turned on or off, and renders with syntax highlighting
  • Allow optional "hour", "hours" and "hrs" unit after the spent time command in the commit hook (Thanks Andrei!)
  • Display remaining time as 0 if the ticket is closed

If you have an existing installation, you will need to carry out the following steps to enable the snippets feature:

  1. Add the Snippets ACL root
    php bin/add-acl-object.php --config-file /path/to/config.ini Snippets
  2. Add the Snippets table
    sqlite3 /path/to/var/mtrac.db
    CREATE TABLE snippets (
            -- snippet id
            snid text not null,
            -- ref. to changes table
            created INTEGER NOT NULL,
            updated INTEGER NOT NULL,
            -- summary/blurb in wiki markup
            description text not null,
            -- what language?
            lang text not null,
            -- and the snippet itself
            snippet text not null,
            primary key (snid)
    );
    
  3. Grant rights to Snippets; append the SnippetCreator to your admin and authenticated user class roles in your config.ini; I've included the new defaults below:
    ; Defines some basic, reasonable, permission sets for 3 classes of user.
    ; These are used in addition to whatever is selected by auth plugins
    [user_class_roles]
    anonymous = ReportViewer,BrowserViewer,WikiViewer,TimelineViewer,RoadmapViewer,TicketViewer
    authenticated = ReportViewer,BrowserViewer,WikiCreator,TimelineViewer,RoadmapViewer,TicketCreator,UserViewer,SnippetCreator
    admin = ReportCreator,BrowserCreator,WikiCreator,TimelineViewer,RoadmapCreator,TicketCreator,EnumerationCreator,ComponentCreator,ProjectCreator,UserCreator,SnippetCreator
    

Where to get it

You can find the code here

Snippet Creation

Snippet View

Ticket View