Page 1 of 2

Mantis plugin - RequiredFields

Posted: 06 Jan 2012, 12:48
by rct
Hello,

This plugin permit to add constraints to bug reporting/updating on a per project basis.
In this version the constraints you can add are making fields "version" and/or "target version" required.

The plugin is available in english (maybe poor english) and french.

http://web.magellium.fr/~rct/mantis/Req ... v1.0.5.zip

Re: Mantis plugin - RequiredFields

Posted: 06 Jan 2012, 13:01
by atrol
Thanks for your contribution.

I had a very very quick look at the source code.
Just one hint for RequiredFields.php

Code: Select all

// Reporter or updater users can't specify the target version
if ($user_access_level != REPORTER && $user_access_level != UPDATER) {
It's also possible that other access levels are not able to specify target versions (also versions)
The fields which are shown when reporting can be customized using $g_bug_report_page_fields

Re: Mantis plugin - RequiredFields

Posted: 06 Jan 2012, 14:11
by rct
It doesn't looks a simple issue but I will look at it.

Thanks for feedback.

Re: Mantis plugin - RequiredFields

Posted: 06 Jan 2012, 15:00
by atrol
Shouldn't be too hard.
Something like this should do the job

Code: Select all

$t_fields = config_get( 'bug_report_page_fields' );
$t_fields = columns_filter_disabled( $t_fields );
$tpl_validate_product_version = in_array( 'product_version', $t_fields );
$tpl_validate_target_version = in_array( 'target_version', $t_fields ) && access_has_project_level( config_get( 'roadmap_update_threshold' ) );

Re: Mantis plugin - RequiredFields

Posted: 06 Jan 2012, 15:13
by rct
I have already used that portions of code need to test now :)

Thanks again !

Re: Mantis plugin - RequiredFields

Posted: 06 Jan 2012, 15:35
by rct
Plugin updated :)

Re: Mantis plugin - RequiredFields

Posted: 20 Jan 2012, 14:07
by syl
Hello, étant en version 1.8, je ne peux pas utiliser ton plugin,
comment puis je rendre obligator le champ résolu dans le version lors de la fermeture d'un bug ?

Re: Mantis plugin - RequiredFields

Posted: 20 Jan 2012, 14:15
by rct
Je suppose que tu parles de la version 1.1.8 donc essaies de regarder du côté du plugin MyReport : http://deboutv.free.fr/mantis/plugin.ph ... n=MyReport

A+

Re: Mantis plugin - RequiredFields

Posted: 23 Jan 2012, 14:20
by syl
Merci :D ,
je vais regarder ceci pour voir si cela peut correspondre a mes besoins.
Je vais penser a installer le dernière version mais justement j'utilise des anciens plugins qui ne seront plus compatibles.
Y a t'il un endroit où est rensensée le liste des plugins mantis comme le tiens, j'ai trouvé ceci mais il n'y en a pas beaucoup:
http://www.mantisbt.org/wiki/doku.php/m ... is_plugins

@+

Re: Mantis plugin - RequiredFields

Posted: 23 Jan 2012, 14:36
by rct
L'ancien système de plugin est un système externe à Mantis. Depuis la version 1.2 il y a un nouveau système de plugins dont la liste n'est pas exhaustive et que tu peux trouver sur le lien que tu as donné.
Personnellement je t'invite à essayer de passer en 1.2 si tu as le temps car ça vaut le coup en terme de maintenabilité et d'évolutivité.

Bonne chance.

Re: Mantis plugin - RequiredFields

Posted: 23 Jan 2012, 14:58
by Reinder
mm, when I try to install the plugin in version 1.2.8 I get:

Upgrading the plugin schema failed in block #0.

Re: Mantis plugin - RequiredFields

Posted: 23 Jan 2012, 15:15
by rct
Hi,

Does your mantis db user have the hability to create a new table ?

Re: Mantis plugin - RequiredFields

Posted: 24 Jan 2012, 08:15
by Reinder
a, that seemed to fix the problem :)

Re: Mantis plugin - RequiredFields

Posted: 24 Jan 2012, 08:56
by rct
Nice !

I'll try to add an error message to prevent this error.

Re: Mantis plugin - RequiredFields

Posted: 20 Mar 2012, 19:19
by Reinder
Got another problem staqted in a different post; http://www.mantisbt.org/forums/viewtopi ... 293#p48293

Simpley explained; making version required gives an error :(