Skip to content
Robert Munteanu edited this page Jul 8, 2016 · 1 revision

Configuration

Time tracking

Requirements:

  • MantisBT version >= 1.2.2
  • MantisBT configuration : $g_time_tracking_enabled = ON;
  • User access: has time_tracking_view_threshold and time_tracking_edit_threshold

The plugin integrates with the time tracking facilities offered by the core Mantis product as of version 1.2 . There is no integration with other timetracking plugins .

Time tracking is performed by the 'Track time' action at the bottom of the task editor page

A summary of the time tracked is present in the attributes section of the task editor page

Troubleshooting

The MantisBT SOAP API is more sensitive to configuration errors than the web interface and also requires more resources As such, it's not unusual to have a fully functional web interface, but a non-functional SOAP API.

You should start by validating your repository configuration within Eclipse. Should that fail, verify your server logs ( Apache/IIS/etc ).

Repository validation fails

If the repository validation fails outright, the possible problems may occur:

Trailing whitespace

If the error reported by the connector is similar to The processing instruction target matching "[xX][mM][lL]" is not allowed you probably have whitespace prepended to the output. The usual suspect is config_inc.php - check to see if that generates whitespace.

Out of memory errors

If the Apache (or other web server) logs contain entries similar to:

Mon Aug 10 23:36:51 2009] [error] [client 172.16.101.174] PHP Fatal error:  Allowed memory size of 10485760 bytes exhausted
(tried to allocate 41507 bytes) in /home/robert/public_html/mantis/mantisbt-1.1.7/api/soap/nusoap/nusoap.php on line 292

You should raise your php memory limit. A good starting value is 48 MB.

Warnings

The cause of the problem can be the way how warnings are reported in PHP. If PHP.INI contains the following configuration line:

error_reporting = E_ALL

it will report not only errors, but also warnings. These warnings will also be send as part of the SOAP messages the Mantis Connector produces, resulting in an invalid SOAP message. To prevent this change the configuration line into:

error_reporting = E_ALL & ~E_NOTICE

Now all errors will be reported, but warnings will be excluded.

Unsupported versions

If you're using a very recent MantisBT version then the connector may not yet be updated to recognize it. One such error message is

    Failed validating connection to the task repository : Unknown version 2.0.0-beta.1-dev .

First of all, try updating to the latest version of the connector. If that does not solve the problem, raise a bug on the issue tracker.

SourceForge.Net Hosted Apps

If you are using a Hosted Apps instance of MantisBT on Sourceforge.Net, please be aware that SOAP access is not available. Consider CC-ing yourself to the Trac ticket related to the MantisBT SOAP API issue for getting notified when this will be fixed.

Task editor problems

Empty attributes in task editor

If you can successfully validate the repository and synchronize queries, but attributes come up empty in the task editor, you might be affected by a MantisBT bug reported against version 1.2.4: mc_enum_api does not object user language preferences. It only affects users whose language setting is different from that of the repository. There are two possibilities:

You should also find error log entries similar to:

  • Unable to find the level for the status named ...
  • Task ... : Unable to find match for ... value ... in repository-supplied options ...

Downloading attachments fails

MantisBT versions prior to 1.2.4 were incorrectly looking up attachments, and in some cases attachment download failed( mc_issue_attachment_get does not use the path for the file ). Please upgrade to MantisBT 1.2.4 or newer.

Access control issues

Access is denied, even though the credentials are correct

The SOAP API has different access thresholds from the main web UI. By default readonly access is granted only to users at REPORTER level.

If a user has a VIEWER global level but REPORTER or higher for distinct projects, query synchronization will not work since he or she will not be able to get the priorities, versions etc.

The recommended fix is to create the api/soap/mc_config_inc.php file containing $g_mc_readonly_access_level_threshold = VIEWER.

Verifying the Mantis SOAP API using SOAP UI

Should you need to verify the behaviour of the SOAP UI in detail, a recommended client is SOAP UI.

  • Download and install Soap UI;
  • Create a project for your Mantis installation. The WSDL file should be http://your/install/mantis/api/soap/mantisconnect.php?wsdl
  • After the sample requests are generated, run a mc_version_get call, to validate that the basic SOAP UI functions work
  • If that works, run a mc_projects_get_user_accesible, to see the projects your user has access to.