Indeed there are events to handle that.

 

When we began to develop agileMantis we made the design decision to use custom fields,

as they seemed to have the smallest development cost.

We use them quite often in our plugin, so it would mean a huge effort to switch to the event driven solution.

 

So we decided to make all the earlier mentioned changes to our plugin to adapt to the MantisBT-Standards.

But we won’t change the way we handle custom fields (except to make better usage of the MantisBT API)

 

There is also the problem, that custom fields need to be localized in the custom_string_inc.php in the MantisBT main directory.

As a plugin shouldn’t change anything there we need to manually add the translation strings to that file.

The make this smoother for the plugin users, we want to add a “create custom strings” page in our plugin configuration that either

writes the custom strings to “custom_string_inc.php” (if write is possible) or shows a text area with the content that needs to be added to that file.

 

It would be nice if we could just add our own “custom_string_inc.php” to our plugin folder. MantisBT could then add our contents to the default “custom_string_inc.php”.

Maybe there are some API functions, that would allow us to localize our custom strings without changing the “custom string_inc.php”?

 

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: Dienstag, 8.
Juli 2014 14:12
An: developer discussions
Betreff: Re: [mantisbt-dev] Fixed Problemes / Improving agileMantis / Help Needed

 

OK, it seems that they do exist in fact:

    # Bug filter events
    'EVENT_FILTER_FIELDS' => EVENT_TYPE_DEFAULT,
    'EVENT_FILTER_COLUMNS' => EVENT_TYPE_DEFAULT,

    # Bug report event
    'EVENT_REPORT_BUG_FORM_TOP' => EVENT_TYPE_EXECUTE,
    'EVENT_REPORT_BUG_FORM' => EVENT_TYPE_EXECUTE,
    'EVENT_REPORT_BUG_DATA' => EVENT_TYPE_CHAIN,
    'EVENT_REPORT_BUG' => EVENT_TYPE_EXECUTE,

So it means that instead of custom fields you could use these events to custom your display.

Then the internationalisation would be done inside the lang subfolder of the agile plugin, no need to rely on the custom_strings_inc.php.

If I'm not wrong.

AlainD.

 

On Tue, Jul 8, 2014 at 2:08 PM, Alain D'EURVEILHER <alain.deurveilher@gmail.com> wrote:

I think that there are events which can be used for that purpose.

On the report page you could use the event EVENT_REPORT_BUG_FORM_TOP or EVENT_REPORT_BUG_FORM to insert your plugin's form.

There also some events on the view bugs page, at least to be used to insert some links. But I don't know whether events for filtering and result display exists yet?

 

On Tue, Jul 8, 2014 at 12:58 PM, Schmitz, Jean <J.Schmitz@gadiv.de> wrote:

The reason why we are using custom fields is, that we need to show additional columns on the default "View Issues" page.
We are showing e.g. an assigned Product Backlog and Sprint.
Otherwise we would have had to create our own copy of the "View Issues" page.

The other part is, that we are adding custom fields to the default "Report Issue" page, if the project is assigned to a product backlog.
Again, we would have had to create our own version of the "Report Issue" page.

The good part on that is, that if a new MantisBT Version, with new page layout, gets released our plugin should still work and we don't need to build new pages.


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]

-----Ursprüngliche Nachricht-----
Von: Damien Regad [mailto:dregad@mantisbt.org]
Gesendet: Dienstag, 8. Juli 2014 11:13
An:
Mantisbt-dev@lists.sourceforge.net
Betreff: Re: [mantisbt-dev] Fixed Problemes / Improving agileMantis / Help Needed


On 08.07.2014 10:44, Schmitz, Jean wrote:
> To translate custom fields into other languages  there needs to be a
> file called "custom_strings_inc.php" in the main directory of the
> mantis installation.
>
> As our plugin makes use of custom fields and we want to localize them,
> is there a clean way to translate the fields just by using the plugin code?

I don't think that's possible.

However, I am not sure that using custom fields is the right design approach and wonder why you decided to use them instead of creating plugin-specific tables containing your data. Then you can have full control over everything.

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

Your plugin can call any function in the MantisBT APIs including the custom fields-related ones.


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft _______________________________________________
mantisbt-dev mailing list
mantisbt-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
mantisbt-dev mailing list
mantisbt-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-dev



--

AlainD.




--

AlainD.