Schmitz, Jean
2014-07-03 15:02:05 UTC
Hello Damien,
you are right, I send it to the mailing list.
Best regards
Jean Schmitz
giServer project:
http://gadivintegrationserver.sourceforge.net/
http://www.gadiv.de/de/opensource/giserver/giserver.html
Please join out mailing lists:
https://sourceforge.net/p/gadivintegrationserver/mailman
Von: ***@gmail.com [mailto:***@gmail.com] Im Auftrag von Damien Regad
Gesendet: Donnerstag, 3. Juli 2014 16:40
An: Alain D'EURVEILHER
Cc: Schmitz, Jean; Jenauer, Walter; Zschoerner, Janine; Damien Regad
Betreff: Re: Fixed Problemes / Improving agileMantis / Help Needed
Guys,
Unless you really want to keep this off-the-record, I would strongly suggest to move such discussions to the mantisbt-dev mailing list.
Best regards,
Damien
On 3 July 2014 15:36, Alain D'EURVEILHER <***@gmail.com<mailto:***@gmail.com>> wrote:
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 <***@gadiv.de<mailto:***@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:***@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 <***@gadiv.de<mailto:***@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<tel:%2B49%20%280%292245%20%2F%209160-32>
Fax:
+49 (0)2245 / 9160-21<tel:%2B49%20%280%292245%20%2F%209160-21>
E-Mail:
***@gadiv.de<mailto:***@gadiv.de>
Web:
www.gadiv.de<http://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:***@gmail.com<mailto:***@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.
you are right, I send it to the mailing list.
Best regards
Jean Schmitz
giServer project:
http://gadivintegrationserver.sourceforge.net/
http://www.gadiv.de/de/opensource/giserver/giserver.html
Please join out mailing lists:
https://sourceforge.net/p/gadivintegrationserver/mailman
Von: ***@gmail.com [mailto:***@gmail.com] Im Auftrag von Damien Regad
Gesendet: Donnerstag, 3. Juli 2014 16:40
An: Alain D'EURVEILHER
Cc: Schmitz, Jean; Jenauer, Walter; Zschoerner, Janine; Damien Regad
Betreff: Re: Fixed Problemes / Improving agileMantis / Help Needed
Guys,
Unless you really want to keep this off-the-record, I would strongly suggest to move such discussions to the mantisbt-dev mailing list.
FYI, the variable are stored in the table: mantis_plugin_config_table with the id: agileMantis_my_config.
The table is mantis_config_table.Best regards,
Damien
On 3 July 2014 15:36, Alain D'EURVEILHER <***@gmail.com<mailto:***@gmail.com>> wrote:
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 <***@gadiv.de<mailto:***@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:***@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 <***@gadiv.de<mailto:***@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<tel:%2B49%20%280%292245%20%2F%209160-32>
Fax:
+49 (0)2245 / 9160-21<tel:%2B49%20%280%292245%20%2F%209160-21>
E-Mail:
***@gadiv.de<mailto:***@gadiv.de>
Web:
www.gadiv.de<http://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:***@gmail.com<mailto:***@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.
AlainD.
--
AlainD.