Hello Alain,

 

I have some question on topic #3 “custom fields”.

Indeed we heavily rely on the use of custom fields.

It’s right that we should have used API functions instead of direct inserts.

 

What we do, is that we add the custom fields during installation of the plugin.

Then, if someone decides to create a product backlog we assign the custom fields to the selected project.

 

So from my opinion, there shouldn’t be the need to manually select the custom fields on the config page.

So, do you thing that, if we just use the API functions instead of the direct inserts this will be sufficient?

 

 

Best regards

Jean Schmitz

 

Projects on Source Forge:

agileMantis - http://www.agilemantis.org

giServer - http://www.giserver.org

 

Please join out mailing lists:

[gadivintegrationserver-announcement]

[gadivintegrationserver-development]

[agilemantis-announcement]

[agilemantis-development]

 

Von: Alain D'EURVEILHER [mailto:alain.deurveilher@gmail.com]
Gesendet: Donnerstag, 3. Juli 2014 15:36
An: Schmitz, Jean
Cc: Jenauer, Walter; Zschoerner, Janine; Damien Regad
Betreff: Re: Fixed Problemes / Improving agileMantis / Help Needed

 

Hi everyone,

I think that all the points are listed, I cannot find more ones.

First let me remind you that I am not a member of the MantisBT team as your email suggested ;-), but a regular user, who happens to be also a plugin creator (GanttChart).

I'd like also to apologize for remaing silent during the last few weeks, as some urgent tasks recently appeared to be achieved in a very short time, which kept me very busy (and I still am by the way).

Now my comments:

In fact the guideline you refer to is nice, but does not explains how to create a plugin. I don't know if there is such a guide somewhere...

I think we could prioritize the tasks as the following, according to the complexity (easiest first):

- 1: usage of the database_api: db_query_bound(), etc... (very easy to do. A bit repeatitive and long, but easy).

- 2: No modification of the config_inc.php file. use the plugin_config APIs instead. Not too difficult also to refactor here, it is quite easy to understand. Basically when a plugin needs a configuration we create it with plugin_config_set( 'my_config', $t_value ). Then we required, retrieve the value with: plugin_config_get( 'my_config' ). FYI, the variable are stored in the table: mantis_plugin_config_table with the id: agileMantis_my_config.

- 3: No direct insert into Mantis table. This one is a bit more complicated. If possible, yes, use some custom fields. As they are custom field, there should be in the configuration pages of the plugin, a detailed help page describing to the user what kind of custom fields is required (type, values, etc...). Then in the config page, the user must select among the existing custom fields the one which needs to be used for a specific purpose. Also, if the plugin is based on the settings of some custom field, keep in mind that the custom fields are not available by default to all the mantis projects, but is assigned to one or another project by the Mantis manager. So there must be some checks/verifications/warning messages to add in the source code of the plugin to manage the case where the expected custom fields are not set for the selected project.

- 4: No direct insert in mantis table, and no "CREATE TABLES". Idem there some API to use: plugin_table() and schema() function. That way all the plugin tables are standardized. (for information, they will be named mantis_plugin_agileMantis_my_table. But we use the API to call them plugin_table( 'my_table' ).). This task is not toooo difficult, but it's a major change in the DB. If you need also informations to specific issues, or projects, then you'll need to create relational tables instead of creating new columns inside existing mantis tables.

A very good example for the usage of 3 and 4 above is the pluging 'Souce Control Integration' of John Reese: http://leetcode.net

 

If you have any remarks about my analysis let me know. Then we could think of assigning the tasks.

Best regards,

AlainD.

 

 

On Wed, Jul 2, 2014 at 4:58 PM, Schmitz, Jean <J.Schmitz@gadiv.de> wrote:

Hello Alain,

 

I am a co-worker of Jan. As Jan is occupied by another project for now, I took over this issue.

 

I made a list of things that need to be changed from what I learned so far.

Maybe you or one of the other MantisBT team members can have a look on it.

Then we can start do work on the necessary changes.

 

-          Source code needs to follow the MantisBT coding guidelines at https://www.mantisbt.org/wiki/doku.php/mantisbt:coding_guidelines

-          All SQL calls  need to make use of the db_query_bound() method

-          No direct creation of tables via CREATE TABLE, instead make use of the schema() method to manage plugin-specific tables.

-          No direct inserts into Mantis base tables. Make use of Mantis API, e.g. for custom fields.

-          Don’t mess with the MantisBT configuration file (no special entries for the plugin)

 

Is there anything I missed?

 

Thanks for your help.

 

Jean

 

Von: Alain D'EURVEILHER [mailto:alain.deurveilher@gmail.com

]
Gesendet: Dienstag, 10.
Juni 2014 12:00
An: Koch, Jan
Cc: Jenauer, Walter; Zschoerner, Janine
Betreff: Re: Fixed Problemes / Improving agileMantis / Help Needed

 

Dear Jan,

I will not be able to work on aglieMantis this week, and maybe neither next week. But I think I could start to analyse what need to change the week after.

I will let you know whenever I'm free.

Thank you.

 

On Fri, Jun 6, 2014 at 4:11 PM, Koch, Jan <J.Koch@gadiv.de> wrote:

Hey Alain,

 

as promised, we would like to tell you about our results.

 

Faulty tags: we tested our changes with different MantisBT-Versions and with short-tags deactivated. Unfortunately, we did not pay attention to the server setting for short-tags during the development, that is why these errors have not noticed yet.

 

The use of the custom_strings_inc.php has already been explained.

 

Language strings in strings_english.txt: There were actually a few more hits with lang_get (). These have been changed to plugin_lang_get ().

 

CREATE TABLE: will have to be changed.

 

The modified software including other minor corrections will be uploaded on sourceforge and github in a few minutes.

 

agileMantis was developed by the end of 2013 for a inhouse use only. Therefore, we paid no special attention at the standards of MantisBT.

Then we decided to release the software as Open Source.

 

There are already user stories in our Product Backlog which provide a refactoring to the standards of MantisBT.
We will put a stronger effort on this user stories and we will do it now.

 

We are thankful for your offer to help us.


Especially because I am recently working in an external project and the current summer holidays, fewer PHP experts are available in our team.

 

Do you have a suggestion with what you can start?

 

Jan Koch

Junior Software Engineer


gadiv GmbH
Bövingen 148
53804 Much

Tel.:

+49 (0)2245 / 9160-32

Fax:

+49 (0)2245 / 9160-21

E-Mail:

j.koch@gadiv.de

Web:

www.gadiv.de


Vertreten durch die Geschäftsführer:
Walter Jenauer, Axel Heuchmer, Werner Mauelshagen

Gesellschaftssitz: Much
Amtsgericht Siegburg HRB 2487
USt-ID DE123109137


 

Von: Alain D'EURVEILHER [mailto:alain.deurveilher@gmail.com]
Gesendet: Freitag, 6.
Juni 2014 10:54
An: Koch, Jan
Betreff: agileMantis refactoring

 

Hi Jan,

We really like your plugin and would like to use it on our porject.

If you'd like us to help you refactor it in order to meet the Mantis standards about plugins implementation, feel free to ask.

Best Regards


--

AlainD.




--

AlainD.




--

AlainD.