MantisBT: ForceFixedIn

ForceFixedIn

Version 1.0
Copyright 2010, Brian Enigma <brian@netninja.com>, http://netninja.com
Licensed under the GNU General Public License.

Theory

At the office, we use Mantis, which is a pow­er­ful PHP-based bug track­ing sys­tem.  It offers some great con­trol over process and work­flow, but not quite the gran­u­lar­ity that I need.  Specifically, I work in an envi­ron­ment where it is vital that the “fixed-in” ver­sion is filled in when resolv­ing an issue as “fixed.”  Without this, there is no easy way to gen­er­ate an accu­rate changelog.  Although we all do our best to fill this field in, there are slipups.  To bet­ter catch these slipups when they occur, I have writ­ten the ForceFixedIn plu­gin.  The plu­gin itself is rel­a­tively sim­ple and fol­lows this pseudocode:

  1. Is the issue get­ting marked as “resolved?”
  2. Is the issue get­ting marked as “fixed?”
  3. Does the issue belong to a project for which one or more ver­sions are defined?
  4. If all of the above is “yes,” then fail unless some­thing has been entered for a fixed-in ver­sion num­ber.

Requirements

Mantis 1.2.0 or greater is required.

Installation

Installation is sim­ple and involves cre­at­ing a plu­gin folder and copy­ing the plugin’s PHP file into the folder.  You then acti­vate it from within Mantis.

  1. Create a folder under your man­tis plu­g­ins folder named ForceFixedIn.  For instance, if you have Mantis installed at /var/www/mantisbt, then you would cre­ate /var/www/mantisbt/plugins/ForceFixedIn.
  2. Copy ForceFixedIn.php into this folder.
  3. Log in to Mantis as an admin­is­tra­tor.
  4. Go to Manage -> Manage Plugins and click “Install” next to ForceFixedIn.

Downloading/Version History

The orig­i­nal v1.0 release was the last one I worked on. It has been about 5 years since I last used Mantis. This means I have lit­tle inter­est in updat­ing and main­tain­ing new releases. I have since moved the code to a GitHub repos­i­tory. As indi­vid­u­als sub­mit fea­tures and bug­fixes, I merge them with the repos­i­tory. You can find the lat­est, great­est code there.

5 thoughts on “MantisBT: ForceFixedIn

  1. Hi,

    I tried your plu­gin with Mantis 1.2.4. The check works and tells me that I have to add a ver­sion num­ber, but the bug is still saved. It seems that your raiseer­ror func­tion does not work cor­rectly with Mantis 1.2.4 any­more.

  2. Thank you for this plu­gin — it solved my prob­lem! Just the error mes­sage wasn’t so nice. I made a cor­rec­tion:


    function raiseError()
    {
    // This is probably not the intention of ERROR_VERSION_NOT_FOUND, but it
    // works for our purposes of aborting the update.
    error_parameters(lang_get( 'fixed_in_version' ));
    trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>