Mantis plugin - RequiredFields

Post about your customizations to share with others.

Moderators: Developer, Contributor

rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Mantis plugin - RequiredFields

Post 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
Last edited by rct on 02 May 2012, 09:54, edited 4 times in total.
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis plugin - RequiredFields

Post 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
Please use Search before posting and read the Manual
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post by rct »

It doesn't looks a simple issue but I will look at it.

Thanks for feedback.
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis plugin - RequiredFields

Post 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' ) );
Please use Search before posting and read the Manual
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post by rct »

I have already used that portions of code need to test now :)

Thanks again !
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post by rct »

Plugin updated :)
syl
Posts: 16
Joined: 14 Aug 2007, 15:46

Re: Mantis plugin - RequiredFields

Post 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 ?
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post 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+
syl
Posts: 16
Joined: 14 Aug 2007, 15:46

Re: Mantis plugin - RequiredFields

Post 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

@+
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post 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.
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Re: Mantis plugin - RequiredFields

Post 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.
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post by rct »

Hi,

Does your mantis db user have the hability to create a new table ?
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Re: Mantis plugin - RequiredFields

Post by Reinder »

a, that seemed to fix the problem :)
rct
Posts: 16
Joined: 06 Jan 2012, 12:28

Re: Mantis plugin - RequiredFields

Post by rct »

Nice !

I'll try to add an error message to prevent this error.
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Re: Mantis plugin - RequiredFields

Post 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 :(
Post Reply