Search found 36 matches

by federico
Sep 30, 2019 7:30 am
Forum: General Plugin Discussion
Topic: Extend rest api
Replies: 13
Views: 1929

Re: Extend rest api

The error I get is in the following piece of code: protected function finalize(ResponseInterface $response) { // stop PHP sending a Content-Type automatically ini_set('default_mimetype', ''); if ($this->isEmptyResponse($response)) { return $response->withoutHeader('Content-Type')->withoutHeader('Con...
by federico
Sep 26, 2019 5:44 am
Forum: General Plugin Discussion
Topic: Extend rest api
Replies: 13
Views: 1929

Re: Extend rest api

As an example of extending the REST API from a plugin, you can have a look at the Announce plugin. You need to hook EVENT_REST_API_ROUTES (see https://github.com/mantisbt-plugins/Announce/blob/v2.4.1/Announce.php#L46) define your routes (https://github.com/mantisbt-plugins/Announce/blob/v2.4.1/Anno...
by federico
Sep 19, 2019 8:51 am
Forum: Help
Topic: How to set a new cookie when current project changed?
Replies: 0
Views: 122

How to set a new cookie when current project changed?

Hello.

I am looking the place to set a new cookie whenever the current project is set.

Thank you in advance
by federico
Sep 14, 2019 5:02 am
Forum: Help
Topic: Execute a function from custom_strings.php
Replies: 0
Views: 139

Execute a function from custom_strings.php

Hello.

Has someone knows the best place to invoke a function to retrieve a parameter from the database at custom_strings.php?

I tried, but get an error 500.

Thanks.
by federico
Sep 07, 2019 4:05 am
Forum: General Plugin Discussion
Topic: Extend rest api
Replies: 13
Views: 1929

Re: Extend rest api

Thank you very much !
by federico
Jul 24, 2019 3:17 am
Forum: Help
Topic: Attached files to private notes
Replies: 7
Views: 881

Re: Attached files to private notes

I've just finished, thinking it is enaugh tested and seems to work fine. The experience As well as other parts of the program are clean, the code to manage file attachments is really a mess. The current attachment management implementation, mixes different patterns (OO vs !OO) in different levels of...
by federico
Jul 13, 2019 3:04 pm
Forum: Help
Topic: Attached files to private notes
Replies: 7
Views: 881

Re: Attached files to private notes

Thank you. I am almost finishing the job, and it seems to work by the moment. There are three or four more files to change, but I thing the approach is clean. I can not wait or follow processes because my customer thought it was working fine. I would share the complete solution in order to its revis...
by federico
Jul 02, 2019 12:58 am
Forum: Help
Topic: Attached files to private notes
Replies: 7
Views: 881

Re: Attached files to private notes

Finally it is an issue by design. The note attachments are added as a result of a timestamp comparison, without a real relationship between notes and attachments (as cproensa suggests at https://mantisbt.org/bugs/view.php?id=21733 ). The approach I am evaluating is the following: - mantis_project_fi...
by federico
Jul 01, 2019 12:10 am
Forum: Help
Topic: Attached files to private notes
Replies: 7
Views: 881

Re: Attached files to private notes

Thanks atrol. Does someone knows the reason? I have found this issue a week before the users should start to use mantisbt, and after 1000 working hours checking mantis requirements, configuring it for their needs, and developing a plugin to perform some custom transactions. Too late for me, so I nee...
by federico
Jun 30, 2019 6:14 am
Forum: Help
Topic: Attached files to private notes
Replies: 7
Views: 881

Attached files to private notes

Hello all. The of mantis behaviour when trying to attach files to a private note is the following (for version 2.20.0) - If the note is public: You can mix text and files in the same notes, and both works well without dependencias - If the note is private: I had to comment bugnote_add_inc.php line 1...
by federico
Jun 27, 2019 3:42 am
Forum: Help
Topic: Static resources
Replies: 0
Views: 282

Static resources

Hello all.

¿Does someone know the best way to internationalize static contents with mantis (or PHP)? The current way is heavy to digest with large an formatted contents
by federico
Jun 13, 2019 10:43 am
Forum: Help
Topic: Transaction
Replies: 0
Views: 316

Transaction

Hello. I need to extend the project table with a discriminator to diferentiate project types. I do not know what strategy is better for my plugin: a) alter the project table to add a new column for my discriminator, and write this column after inserting with the api b) create a new table with a 1_1 ...
by federico
Jun 08, 2019 2:30 pm
Forum: General Plugin Discussion
Topic: Extend rest api
Replies: 13
Views: 1929

Re: Extend rest api

I would like to share this small piece of code, which offers two benefits: Integrate external data sources in the business layer Retrieve JSON info which makes the UI more simple and accurate to work with data asynchronously Is my first time with PHP and also Mantis, and I am not absolutely sure if ...
by federico
Jun 05, 2019 7:06 am
Forum: Help
Topic: Restrict user management
Replies: 6
Views: 692

Re: Restrict user management

Thank you again.

It was true. There was a compatibility issue with the calendar plugin due the mantisbt version was not the right one in one of the servers, but it not solve the main problem.

The problem was with a reauthenticate function call in a wrong place.
by federico
Jun 05, 2019 4:08 am
Forum: Help
Topic: Restrict user management
Replies: 6
Views: 692

Re: Restrict user management

Thank you, Atrol. Unfortunately, I am working for a small organization with poor network resources, and your proposal would produces me to change configurarion in about 200 browsers manually. I've found additional information. It happens when accessing the calendar plugin page, so my first candidate...