Mantis Logo
Mantis Manual
Manual
Customizing Mantis

Custom Fields
Enumerations
Email Notifications
Customizing Status Values
LDAP
Custom Functions


Partner Links


Custom Fields
Last Modified: December 15, 2003 02:12AM
(0.18.0)
Description

There have been multiple requests to add certain fields to Mantis bugs. These requests were not realised because of the concern that they might over complicate the usage of Mantis while not add value for most users.

Hence, Mantis 0.18.0 introduces custom fields to enable project managers to define extra fields for their projects.

Following are some facts about the implementation of custom fields in Mantis:
  • Custom fields are defined system wide.
  • Custom fields can be linked to multiple projects.
  • The sequence of displaying custom fields can be different per project.
  • Custom fields must be defined by users with access level ADMINISTRATOR.
  • Custom fields can be linked to projects by users with access level MANAGER or above (by default, this can be configurable).
  • Number of custom fields is not restricted.

The definition of a custom field includes the following logical attributes:
  • Caption variable name (eg: This is the value that is supplied to lang_get() API, or displayed as-is if not found in language file).
  • Custom field type (string, numeric, float, enum, email)
  • Enumeration possible values (eg: RED|YELLOW|BLUE).
    Use the pipe ('|') character to separate possible values for an enumeration. One of the possible values can be an empty string.
  • Default value.
  • Minimum/maximum length for the custom field value (use 0 to disable).
  • Regular expression to use for validating user input (use ereg() syntax).
  • Advanced? no: Show in simple/advanced pages, yes: Show only in advanced pages.
  • All custom fields are currently saved to a field of type VARCHAR(255) in the database. However, in future releases, it is possible to support custom fields of different types (eg: memo, date, datetime, file).
  • Read Access level: Minimum access level for users to be able to see the value of the custom field.
  • Write Access level: Minimum access level for users to be able to edit the value of the custom field.

If the value of a custom field for a certain defect is not found, the default value is assumed.

Adding/Editing Custom Fields Definitions
  • The logged in user needs manage_custom_fields_threshold access level.
  • Select "Manage" from the main menu.
  • Select "Manage Custom Fields" from the management menu.
  • Click on the name of an existing custom field to edit its information.
  • Enter the name of the new custom field then click "New Custom Field" to add a new field.

Linking/Unlinking/Ordering Existing Custom Fields in Projects
  • The logged in user needs to have access level that is greater than or equal to $g_custom_field_link_threshold and $g_manage_project_threshold.
  • Select "Manage" from the main menu.
  • Select "Manage Projects" in case you are administrator.
  • Select the name of the project to manage.
  • Scroll down to the "Custom Fields" box.
  • Select the field to add from the list, then click "Add This Existing Custom Field".
  • To change the order of the custom fields, edit the "Sequence" value and click update. Custom fields with smaller values are displayed first.
  • To unlink a custom field, click on "Remove" link next to the field.

    Unlinking a custom field will not delete the values that are associated with the bugs for this field. These values are only deleted if the custom field definition is removed (not unlinked!) from the database. This is useful if you decide to re-link the custom field. These values may also re-appear if bugs are moved to another project which has this field linked.

Moving Bugs

When a bug is moved from one project to another, custom fields that are not defined for the new project are not deleted. These fields will re-appear with their correct values if the bug is moved back to the original project, or if these custom fields are linked to the new project.

Custom Severities, Priorites, Statuses, ...etc

This is a completely different issue. See Enumerations for more details about this issue.

Possible Future Enhancements
  • Make custom field searchable.
  • Ability to filter on values of custom fields.
  • Support more field types: date, datetime, memo, file.
  • Support custom fields in resolve/close bugs pages.
  • Control the visibility / mandatory state of custom fields depending on the stage in which the bug is at (eg: reporting, updating, resolving, closing).
  • Ability to export custom fields to csv, Excel, Word.
  • Ability to make a custom field visible in View Bugs page (this also applies for non-custom fields).
  • Ability to filter on custom fields in View Bugs page (this also applies for non-custom fields that are not supported in the filter.
  • Support populating custom fields from LDAP.
  • Support populating custom fields via a SELECT SQL query. The query can use a set of variables like be a $sql_user_id, $sql_project_id, $sql_xxx.

If you are interested in any of the above enhancements and have the time/skills required to implemented it, please contact the development team to make sure that your work can be integrated into Mantis future releases.

User Contributed Notes
Custom Fields
Add Notes About Notes
piccioli@netseven.it
08-Nov-2003 6:06
#23
[Editor] Although the above list of future enhancements was not meant to be comprehensive, it is now updated to include the filtering feature.

---

I suggest you (for the future versions) to add the possibility to set a custom field as filter in the view Bug page.

   Alessio
mulrich@bctNO-techSPAMogy.com
20-Nov-2003 11:17
#25
--> Make custom field searchable. <--

For me this really would be the next thing to do in the system.
This is what my [Mantis] users requested already.

Also, I agree with above, the ability to filter in View Bug Page would be very good too...

The approach that has been choosen so far for custom fields seems to work fine here.
g906705@alumni.nthu.edu.tw
27-Nov-2003 21:41
#29
Will the customized fields be added into the print options, too?
bottenhoopNOFREAKINGSPAM@hotmailfrombill.com
04-Dec-2003 8:44
#31
[Editor] There is already a feature request in the bugtracker for supporting date custom fields. For more details see http://mantis.calaquendi.net/bug_view_advanced_page.php?bug_id=0002984

---

I was asked to add a date field. so the planning date for a bug to be fixed could be added. Any idea's of how to do that?
rabbe.kurten@rkrealtidssystem.com
10-Dec-2003 8:06
#33
[Editor] This issue is now added to the bug tracker. For more details, see http://mantis.calaquendi.net/bug_view_advanced_page.php?bug_id=0003460

---

I can get the custom fields ordered between themselves OK, but how do I get them into the ordinary tab sequence. When I press the tab key within a custom field I jump somewhere into one of the ordinary fields depending on where I was before going into the custom field. Is there a solution to this problem?
Rabbe Kurtén, Stockholm
Add Notes About Notes
Last updated: Sat, 13 Mar 2010 - 8:24:31

Mantis @ SourceForge