Package: mantis2xml
Code|Bugs|Forums|License|ContactMantis2XML is intended to ease migration from MantisBT issues to other
issue management systems. It produces a XML file which can be transformed
to some other format and later imported by issue managements systems.At the moment, only migration to Launchpad Bugs is supported. In particular,
a .XLST file and a shell script are provided so that the process of migrating
issues to Launchpad Bugs are greatly simplified.NoteYou may also be interested on this:Launchpad Export plugin for MantisQuick guide for the impatientCreate a file named~/.mantis2xmlwhich contains the URL of your Mantis instance, username and password of an user withmanageraccess rigths to Mantis. For example:[mantis]
url: http://mantis.example.com/
user: scott
password: beam-me-upInstallxsltprocandjinglike shown below for Debian and derivatives:$ apt-get install xsltproc jing tar bzip2 -yInstall Bazaar and obtain mantis2xml from Launchpad:$ apt-get install bzr -y
$ bzr branch lp:mantis2xmlInstall mantis2xml, in order to make sure all dependencies are installed:$ cd mantis2xml
$ python setup.py installNow run the shell script which converts your Mantis instance:$ ./dump_all_issues.shIf you haveonly one projectin your bug tracking system, the
command above is possibly all you need. If you have more than one
project in Mantis, please have a look at filedump_all_issues.shand follow the steps explained on the top.If everything goes well, you will see some files create in your~/tmp/mantis/1directory:$ ls -al ~/tmp/mantis/1
issues.txt
issues.mantis.xml
issues.launchpad.xml
issues.launchpad.xml.tar.bz2issues.txt: brief summary of issuesissues.mantis.xml: dump of all issues as they were obtained from MantisBTissues.launchpad.xml: issues transformed for being imported by Launchpad Bugsissues.launchpad.xml.tar.bz2: created after validation succeedsTroubleshootingIf you don’t seeissues.launchpad.xml.tar.bz2, it means that the validation ofissues.launchpad.xmlfailed. The errors are reported in the standard output but
you can see them again entering the following command:$ jing -c ./bug-export.rnc ~/tmp/mantis/1/issues.launchpad.xmlThe most common source of troubles is possibly related to duplicated issues. Mantis
supports multiple relationships between issues, including relationships of kindduplicated of(for duplicates) whilst Launchpad Bugs supports zero or one duplicated
issue per issue. If you faced this trouble, you can either fix it by hand in theissues.launchpad.xmlfile or fix it in Mantis, making sure that you have zero or
one duplicated issues per issue, and re-rundump-all-issues.sh.Mapping Mantis to Launchpad BugsMantis provides fieldsSteps to ReproduceandAdditional Informationwhich do not have direct
counterparts in Launchpad Bugs. Also, Mantis provides detailedrelationshipsbetween issues, like:duplicate ofhas duplicatechild ofparent ofrelated towhich are allowed to appear multiple times. Launchpad Bugs supports onlyduplicate of, which can
appear zero or one times. All other relationships are not supported. In order to accomodate these
differences, these fields are incorporated in fieldBug Descriptionin Launchpad Bugs.Additional information:XSL transformation:bug-export.xsltXML validation:bug-export.rncLaunchpad Bugs Import FormatContributing to mantis2xmlmantis2xml was developed in a hurry, in only a couple of days, including this documentation, which consume more time to produce than one may think. There are known bugs and obviously there is certainly a lot of room for improvement.Unfortunately, theauthordoes not consider further developments on mantis2xml. In case you consider taking over of this project, the author will be happy to pass the token to you.Below you see some information which may be of some relevance:Brief HistoryThis application is derived fromsp-mantis2github, which is a Python script
that talks to MantisBT via SOAP and talks to Github via API. This
application does the job wonderfully well, being able to not only
migrate issues to Github, but it also inserts notes in Mantis which link
to the newly created issues in Github.Design decisionsA brief proof of concept was done: I’ve tried to remove call to packagegithuband substitute these calls by calls to packagelaunchpadlib. Due to the waysp-mantis2githubwas written, substituting one API by another
API is not a trivial task. This idea demonstrated to be “too much”, due to
the very little time I reserved for performing the migration I desperately need.So, I simply removed dependencies from github and assumed that we are plenty
satisfied with a XML file, which can be later transformed toLaunchpad Bugs Import Format. These are the steps I’ve taken:remove dependencies from Github API. This was done either removing some code or changing function/method names so that they are never called.obtain the XML representation from SOAP responses which provide objectsmc_issue_getResponse. This is what happens when commandmantis dump issueis entered, which causes the issue to be dumped to the standard output as an XML.get rid of namespaces when the aforementioned XML representation is obtained. This expedient eases a lot the creation of the .XLST file which post-processes the .XML produced.the process of converting the XML toLaunchpad Bugs Import Formatis provided via a shell script, as explained above. I’ve actually tried to automate in Python what is currently being done in the shell script, but it crashes after some 40 issues or so are dumped. No: I’m not willing to discover why it fails. Then I simply removed the logic and kept the shell script.