Upload to Mantis BT

delphi package - automated exception handling

Upload to Mantis BT

Postby mattims » Mon May 28, 2018 9:09 am

I have been testing using upload to MantisBT instead of sending bug reports via email as I got tired of email server settings changes and spam block etc.

I have found that it fails to upload to the MantisBT server if the summary text is too long (longer then 128 characters). It fails with an SQL error of data will be truncated.

I am using MS SQL server for my MantisBT instead of MySQL so that might be a setup problem of mine.

Via a bit of trial and error I was able to find which fields to make sure aren't too long in code, but would it be possible for you to list where all the various parts of the IMEException are mapped to MantisBT fields.

Or point me in the right direction in your code to find this if its not too confusing.


I would like to utilise MantisBT's tags for some things if possible, but I can't see if we have access to them or not.

Is anyone else running MantisBT for autoreported crashes from clients.. how have you got it setup to categorise things etc... just out of interest.

Posts: 1
Joined: Mon May 28, 2018 3:12 am

Re: Upload to Mantis BT

Postby madshi » Mon May 28, 2018 12:49 pm

Maybe the max summary text length is a Mantis option that can be configured somewhere? I don't know for sure, I'm not really a Mantis expert.

An easy fix would be to artificially limit the summary text yourself. You can do that by using "RegisterExceptActionHandler()" and then looking for the "eaSendBugReport2" event, which is after the send assistant has run through, but before the bug report was sent to Mantis. In this situation you could do something like:

Code: Select all
exceptIntf.BugTrackerDescription := Copy(exceptIntf.BugTrackerDescription, 1, 128);

This would limit the size of the summary to 128 characters. Or maybe use 100 characters, just to be safe, in case UTF encoding is used, or something like that?

madExcept doesn't fill many Mantis specific fields. Basically it's just the fields you see in the settings dialog ("project", "area", "assign to"), plus a title and a description, which you can modify through "exceptIntf" (see above).
Site Admin
Posts: 10207
Joined: Sun Mar 21, 2004 5:25 pm

Return to madExcept

Who is online

Users browsing this forum: No registered users and 56 guests