View Issue Details

IDProjectCategoryView StatusLast Update
0008627mantisbtapi soappublic2019-12-13 18:06
Reporterdchevalier Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionnot fixable 
Product Version1.0.8 
Summary0008627: Soap API contribution
Description

I'm web developper at Axidea.fr, a french web company involved in free
software.
For a project we worked on, we've used Mantis/MantisConnect and
added several SOAP functionality that were not yet implemented.

You'll find in attachment a zip containing the Mantis folder of our application.
(Code comments were first written in french but most of it have been translated and we added an english README : ./mantis/webservice/README_EN.html).

We hope our code will be usefull for the MantisBT project.

Additional Information

We used Mantis 1.0.8, NuSoap 0.7.2, PHP 5.1.6, Apache 2.2.4 et MySql 2.9.1.1.

Modifications list :

Refactored permission functions :
Because of code redundancy in MantisConnect functions, we refactored all permission functions, using one main check function ( mciCheckAccess ) which take in parameter an array of constants defining the specific check functions to call.
-> mci_access_api.php : function mciCheckAccess

Mantis error handler overriding :
Webservice do only the tests checked in Mantis graphical user interface, not those made by the Mantis core. Error reports returned by Mantis internal tests, are transmitted to the WS client through SOAP error. Before, the same check was sometimes redundantly made, once in MantisConnect, once in Mantis.
-> mci_trigger.php : function mciErrorHandler

Test scenario :
For our devs, we used a testing script which consist in a scenario of successive WS call. That was very usefull for non-regression tests.
-> ./test-integration/scenario_bug.php (we also made some kind of unit test in ./test-unitaire folder )

New services :
We added the following functionalities :

* Issue management (mc_bug_api.php) :
      o update an issue,
      o assign an issue, 
      o change issue status,
      o move issue form a project to another,
      o start/stop issue monitoring,
      o copy an issue,
      o get issue history,
      o send a reminder to a list of users,
      o get the number of notes for an issue, 
      o get issue update date,
      o re-opening an issue,
      o test if user is the issue reporter,
      o test if a user is assigned to an issue,
      o check the "read only" status of an issue.
* Notes management (mc_bugnote_api.php):
      o change note text, 
      o change note visibility, 
      o get all visible note for a user and a bug,
      o check note existence,
      o check if a user is the reporter of a note.
* Attached file management (mc_file_api.php) :
      o check if an issue has attached files, 
      o check if a user can see the attached files, 
      o check if a user can download the attached files,
      o check if a user can delete the attached files,
      o check if a user can add attached files,
      o check if a user can add  files in a project,
      o delete a file,
      o delete all issue attached files,
      o delete all project attached files,
      o get the number of attached files for an issue.
      o upload remain to do :(

* Filter management (mc_filter_api.php),
      o check if a user can delete a filter, 
      o get default filter, 
      o get a filter saved in database,
      o get the name of a filter,
      o get the available filters for a user and a project,
      o add/modify a filter saved in database,
      o delete a filter saved in database,
      o web service used to get filtered bug list has been enhanced and can handle more options.
* Relationship management (mc_relationship_api.php) :
      o check relationship existence,
      o check if an issue can be resolved (are child issue all resolved?),
      o add a relationship,
      o update a relationship,
      o delete a relationship.
TagsNo tags attached.
Attached Files
axidea_mantis.zip (2,188,333 bytes)

Activities

kingargyle

kingargyle

2007-11-30 16:48

reporter   ~0016341

Definitely some functionality I could use in the Mylyn-Mantis connector project.

vosiez

vosiez

2008-01-14 05:30

reporter   ~0016664

Last edited: 2008-01-14 05:33

Thank you for this wonderful extension! Works great for me except for the email functionality. My server is on PHP 5.0.4 and I'm getting the following error everytime I try to send a reminder from mc_bug_api.php:

Fault: Array ( [faultcode] => Server [faultactor] => [faultstring] => Unknown error : $iErrorCode = "2048", $sErrorInfo = "var: Deprecated. Please use the public/private/protected modifiers", $sErrorFile = "/var/www/html/mantis/core/phpmailer/class.smtp.php", $iErrorLine = "30" [detail] => )

I know that the phpmailer works fine when called from the original mantis code (e.g. from the web interface) or using MantisConnect-1.0a5, as I can receive the notification emails.

Any ideas what I could do to fix this will be appreciated! Thanks in advance.

vosiez

vosiez

2008-01-16 05:04

reporter   ~0016675

Ok, this turns out to be due to the new error handling implementation.

Modified function mciErrorHandler in mci_trigger.php to ignore E_NOTICE and E_STRICT error codes and it stopped complaining. Cheers!

warden

warden

2009-10-30 09:41

reporter   ~0023487

guys, this was two years ago. when are you planning to close that issue and integrate that funcionality into main branch ?!

rombert

rombert

2009-10-30 09:52

reporter   ~0023488

@warden: The focus on 1.2.x - for me at least - is to get it completely functional.

We should look into this again for the 1.3.x or after 1.2.0 is released, but by looking at the feature list some of these are actually included in MantisConnect:

* Relationship management (mc_relationship_api.php) :
      o NOT INCLUDED check relationship existence
      o NOT INCLUDED check if an issue can be resolved (are child issue all resolved?),
      o INCLUDED add a relationship,
      o NOT INCLUDED update a relationship,
      o INCLUDED delete a relationship.

Is there a specific chunk from this patch you'd like to see added? That might have better changes of success.

dregad

dregad

2019-12-03 10:47

developer   ~0063184

We are resolving this issue because it was reported against an old version of MantisBT which is no longer supported. Furthermore, the SOAP API has changed significantly, and REST API has been introduced.

If you think that some of the proposed improvements are still applicable and missing from the latest version of the REST API, please open new issues as appropriate.

Thanks for your contribution and apologies for never getting around to implementing them.