Anonymous Login
2016-05-31 10:15 EDT

View Issue Details Jump to Notes ] Wiki ]
IDProjectCategoryView StatusLast Update
0008627mantisbtapi soappublic2011-09-18 18:07
Assigned To 
Product Version1.0.8 
Target VersionFixed in Version 
Summary0008627: Soap API contribution
DescriptionI'm web developper at, a french web company involved in free
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 InformationWe used Mantis 1.0.8, NuSoap 0.7.2, PHP 5.1.6, Apache 2.2.4 et MySql

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




kingargyle (reporter)

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


vosiez (reporter)

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 (reporter)

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 (reporter)

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


rombert (developer)

@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.

-Issue History
Date Modified Username Field Change
2007-11-30 09:45 dchevalier New Issue
2007-11-30 09:45 dchevalier File Added:
2007-11-30 16:48 kingargyle Note Added: 0016341
2008-01-14 05:30 vosiez Note Added: 0016664
2008-01-14 05:33 vosiez Note Edited: 0016664
2008-01-16 05:04 vosiez Note Added: 0016675
2009-10-30 09:41 warden Note Added: 0023487
2009-10-30 09:52 rombert Note Added: 0023488
2009-10-30 21:10 vboctor Status new => feedback
+Issue History