MantisBT: ForceFixedIn

ForceFixedIn

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

Theory

At the office, we use Mantis, which is a powerful PHP-based bug tracking system.  It offers some great control over process and workflow, but not quite the granularity that I need.  Specifically, I work in an environment where it is vital that the “fixed-in” version is filled in when resolving an issue as “fixed.”  Without this, there is no easy way to generate an accurate changelog.  Although we all do our best to fill this field in, there are slipups.  To better catch these slipups when they occur, I have written the ForceFixedIn plugin.  The plugin itself is relatively simple and follows this pseudocode:

  1. Is the issue getting marked as “resolved?”
  2. Is the issue getting marked as “fixed?”
  3. Does the issue belong to a project for which one or more versions are defined?
  4. If all of the above is “yes,” then fail unless something has been entered for a fixed-in version number.

Requirements

Mantis 1.2.0 or greater is required.

Installation

Installation is simple and involves creating a plugin folder and copying the plugin’s PHP file into the folder.  You then activate it from within Mantis.

  1. Create a folder under your mantis plugins folder named ForceFixedIn.  For instance, if you have Mantis installed at /var/www/mantisbt, then you would create /var/www/mantisbt/plugins/ForceFixedIn.
  2. Copy ForceFixedIn.php into this folder.
  3. Log in to Mantis as an administrator.
  4. Go to Manage -> Manage Plugins and click “Install” next to ForceFixedIn.

Downloading/Version History

The original 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 little interest in updating and maintaining new releases. I have since moved the code to a GitHub repository. As individuals submit features and bugfixes, I merge them with the repository. You can find the latest, greatest code there.

5 thoughts on “MantisBT: ForceFixedIn”

  1. Hi,

    I tried your plugin with Mantis 1.2.4. The check works and tells me that I have to add a version number, but the bug is still saved. It seems that your raiseerror function does not work correctly with Mantis 1.2.4 anymore.

  2. Thank you for this plugin – it solved my problem! Just the error message wasn’t so nice. I made a correction:


    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 *