View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0021887||mantisbt||plug-ins||public||2016-11-08 14:58||2017-04-04 12:11|
|Summary||0021887: Dynamic values for Enumeration Custom Fields using a Plugin|
In MantisBT 2.0.0, the Custom Functions are deprecated in favor of Plugins. In this case, how to create a dynamic list for an enumeration custom field using a plugin?
|Tags||No tags attached.|
We haven't disabled custom functions yet, but this is a good feature request for plugin-ins support for the scenario.
Is it currently possible to create a custom function using a plug-in, i.e. having a custom_functions_inc.php file per plugin?
I'm currently working on a plugin that dynamically give the values of enumeration custom fields in function of the current project.
As for now I use the custom function to redirect it to my plugin but as you said it's deprecated.
But I found where in the core code that is calling the custom function for custom field and I modified it in a way that don't break actual fonctionnement but call my plugin function if it's installed.
the actual code is : ( in custom_field_api.php)
And I modified it to be :
Once I finalized my plugin I can push it to git if you want and with the modification in the core code you can answer to the need of dynamic custom field without custom function.
Do you think you can integrate this plugin to the mantis core in the futur ?
ps: I'm currently developing in the 1.3.5 version of mantis but I can adapt it to the 2.0 if there a need to.
Hi, I finalized my plugin so I leave it in attachement.
Note that this plugin work only if you do the modification is core/custom_field_api.php
you have to replace :
A READ_ME.txt in the .zip indicate how to use the plugin.
if you qualify this plugin suitable @vboctor I can do a PR for the core function and I can also create a git repository for code review.
ProjectCustomFieldList.zip (23,171 bytes)
A quick check in the code seems to indicate the change should be in core.php
that code should be extended to scan the subfolders of all plugins to include the custom functions files.
|2016-11-08 14:58||mcmo||New Issue|
|2016-11-08 15:40||vboctor||Category||custom fields => plug-ins|
|2016-11-08 15:40||vboctor||Note Added: 0054479|
|2016-11-14 08:42||mcmo||Note Added: 0054525|
|2017-01-18 18:12||atrol||Severity||major => minor|
|2017-01-30 11:23||kevcrou||Note Added: 0055401|
|2017-02-08 11:39||kevcrou||File Added: ProjectCustomFieldList.zip|
|2017-02-08 11:39||kevcrou||Note Added: 0055585|
|2017-04-04 12:11||mcmo||Note Added: 0056374|