Custom Fields To Top

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
LukeWCS
Posts: 10
Joined: 11 Mar 2021, 13:22
Location: Germany

Custom Fields To Top

Post by LukeWCS »

Related to: Custom fields at the beginning

Description

Moves selected custom fields to the top of the Report Issue form and the Update Issue form. For both forms it can be specified separately which user-defined fields should be positioned at the top of the form and also in which order. This gives you the freedom to place user-defined fields both at the bottom (Mantis standard) and at the top of the form.

Additional information on the technical side of the plugin
  • Mantis version: 2.25.0+
  • The plugin is designed in such a way that the JS / jQuery script is only loaded where it is needed, i.e. only for the two forms.
  • The JS / jQuery script is isolated as far as the variables are concerned. No variables / functions are defined in the global namespace.
Tested browsers
  • Opera
  • Vivaldi
  • Firefox
  • Edge
  • IE11
Compatibility patch (Mantis 2.0.0+)

The plugin was developed under 2.24.4 and 2.25.0. To find out which Mantis versions the plugin is compatible with, I downloaded all minor versions starting with 2.0.0 and started the test with 2.0.0. I noticed that only the configuration module cannot be opened because a function was added in 2.25.0 that is used by the plugin. If you want to use the plug-in with an older version of Mantis, you can make the plug-in compatible with a small patch.

CustomFieldsToTop.php

Search for:

Code: Select all

'MantisCore' => '2.25.0',
Replace with:

Code: Select all

'MantisCore' => '2.0.0',
pages/config.php

Search for:

Code: Select all

<?php print_icon('fa-cogs', 'ace-icon') ?>
Replace with:

Code: Select all

<i class="ace-icon fa fa-cogs"></i>
Download

https://github.com/LukeWCS/CustomFieldsToTop
Post Reply