Mantis plugin - RequiredFields

Post about your customizations to share with others.

Moderators: Developer, Contributor

Mantis plugin - RequiredFields

Postby rct » Jan 06, 2012 7:48 am

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 May 02, 2012 4:54 am, edited 4 times in total.
rct
 
Posts: 16
Joined: Jan 06, 2012 7:28 am

Re: Mantis plugin - RequiredFields

Postby atrol » Jan 06, 2012 8:01 am

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3635
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Mantis plugin - RequiredFields

Postby rct » Jan 06, 2012 9:11 am

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

Thanks for feedback.
rct
 
Posts: 16
Joined: Jan 06, 2012 7:28 am

Re: Mantis plugin - RequiredFields

Postby atrol » Jan 06, 2012 10:00 am

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3635
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Mantis plugin - RequiredFields

Postby rct » Jan 06, 2012 10:13 am

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

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

Re: Mantis plugin - RequiredFields

Postby rct » Jan 06, 2012 10:35 am

Plugin updated :)
rct
 
Posts: 16
Joined: Jan 06, 2012 7:28 am

Re: Mantis plugin - RequiredFields

Postby syl » Jan 20, 2012 9:07 am

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 ?
syl
 
Posts: 16
Joined: Aug 14, 2007 10:46 am

Re: Mantis plugin - RequiredFields

Postby rct » Jan 20, 2012 9:15 am

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+
rct
 
Posts: 16
Joined: Jan 06, 2012 7:28 am

Re: Mantis plugin - RequiredFields

Postby syl » Jan 23, 2012 9:20 am

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

@+
syl
 
Posts: 16
Joined: Aug 14, 2007 10:46 am

Re: Mantis plugin - RequiredFields

Postby rct » Jan 23, 2012 9:36 am

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

Re: Mantis plugin - RequiredFields

Postby Reinder » Jan 23, 2012 9:58 am

mm, when I try to install the plugin in version 1.2.8 I get:

Upgrading the plugin schema failed in block #0.
Reinder
 
Posts: 115
Joined: Apr 26, 2005 6:08 am

Re: Mantis plugin - RequiredFields

Postby rct » Jan 23, 2012 10:15 am

Hi,

Does your mantis db user have the hability to create a new table ?
rct
 
Posts: 16
Joined: Jan 06, 2012 7:28 am

Re: Mantis plugin - RequiredFields

Postby Reinder » Jan 24, 2012 3:15 am

a, that seemed to fix the problem :)
Reinder
 
Posts: 115
Joined: Apr 26, 2005 6:08 am

Re: Mantis plugin - RequiredFields

Postby rct » Jan 24, 2012 3:56 am

Nice !

I'll try to add an error message to prevent this error.
rct
 
Posts: 16
Joined: Jan 06, 2012 7:28 am

Re: Mantis plugin - RequiredFields

Postby Reinder » Mar 20, 2012 2:19 pm

Got another problem staqted in a different post; viewtopic.php?f=3&t=20267&p=48293#p48293

Simpley explained; making version required gives an error :(
Reinder
 
Posts: 115
Joined: Apr 26, 2005 6:08 am

Next

Return to Customizations

Who is online

Users browsing this forum: No registered users and 3 guests

cron