Copyright 2010, Brian Enigma <email@example.com>, https://netninja.com
Licensed under the GNU General Public License.
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:
- Is the issue getting marked as “resolved?”
- Is the issue getting marked as “fixed?”
- Does the issue belong to a project for which one or more versions are defined?
- If all of the above is “yes,” then fail unless something has been entered for a fixed-in version number.
Mantis 1.2.0 or greater is required.
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.
- 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.
- Copy ForceFixedIn.php into this folder.
- Log in to Mantis as an administrator.
- Go to Manage -> Manage Plugins and click “Install” next to ForceFixedIn.
- Current code: https://github.com/BrianEnigma/MantisForceFixedIn
- Original stable release: ForceFixedIn-1.0.tgz
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”
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.
I can confirm that with mantis 1.2.4
This worked for me in Mantis 1.2.5. The bug was not changed when an error was reported telling me to add a version number.
Thank you for this plugin – it solved my problem! Just the error message wasn’t so nice. I made a correction:
// 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' ));