Automatic Bugtracker report by incoming Emails

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Terko
Posts: 14
Joined: 13 Jan 2010, 14:25

Automatic Bugtracker report by incoming Emails

Post by Terko »

Hi there,


this is first time im working with mantis and its components.
i'm looking for a solution to report incoming emails automatic into mantisBT.
There for , i built a little program which simple logs into Mantis per HTTP POST commands and report any bug like this.

Code: Select all

POST /workflow/bug_report.php HTTP/1.1
Host: file

Content-Type: multipart/form-data; boundary=---------------------------
Content-Length: 1600

-----------------------------
Content-Disposition: form-data; name="bug_report_token"

20100112-eb52d2ae53296422ddc31cd26ca091d8f6263cb8
-----------------------------
Content-Disposition: form-data; name="m_id"

0
-----------------------------
Content-Disposition: form-data; name="project_id"

3

Problem there is that i cant get the boundary ID from bug_report_token so i always get error message that i may postet twice ...
Guess there is some algorithm coded so i cant read out the token from http response header... and trying to rebuild the algorithm may need much more time than i have :(

for my 2nd try... i created a win xp VM with sql and mantis.
i have downloaded MantisConnect-1.0a5.zip and copied the webservice folder into C:\xampp\htdocs\mantis\ folder and renamed it to "mc"
on the next step i downloaded the nant-0.86-beta1, copied the sample.build file from the mantisconnetor\nant-task folder into my own files folder(where nant islooking for build files by default) and executed it in hope it will do a bugrepot entry in mantis.

Code: Select all

<?xml version="1.0" ?>
<project name="MantisConnectNAnt" default="test">

<target name="test">
	<mantis-submit
		url="http://localhost/mantis/mc/mantisconnect.php"
		username="administrator"
		password="root"

		project="Testprojekt"
		summary="Nighty Build Failed"
		description="Nightly build failed during unit testing."
		category="Build"
		stepsToReproduce="Checkout using tag 20040919, and run the build script."
		priority="normal"
		severity="major"
		platform="i386"
		os="Win XP Pro"
		osVersion="SP2"
	/>
</target>

</project>
Following error is displayed :

Code: Select all

NAnt 0.86 (Build 0.86.2898.0; beta1; 08.12.2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/Dokumente und Einstellungen/Admin/sample.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: test


test:


BUILD FAILED

C:\Dokumente und Einstellungen\Admin\sample.build(5,3):
Invalid element <mantis-submit>. Unknown task or datatype.

Total time: 0 seconds.
i didnt configure the mantisconnect.php, since i dunno how and if i have to.
manual login and bugreport works fine

What i have to change that the displayed build script will be reportet in mantis?
Terko
Posts: 14
Joined: 13 Jan 2010, 14:25

Re: Automatic Bugtracker report by incoming Emails

Post by Terko »

I've a edit the class soap_client extends nusoap_base line in the nusoap.php since i got always error message about line 6500

now when im running the nant.exe with the script postet above i get following exception

Code: Select all

NAnt 0.85 (Build 0.85.2478.0; release; 14.10.2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/Dokumente und Einstellungen/Admin/sample.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: test


test:


BUILD FAILED

INTERNAL ERROR

System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefe
hler verursacht. ---> System.IO.FileNotFoundException: Die Datei oder Assembly F
utureware.MantisConnect, Version=1.0.2004.240, Culture=neutral, PublicKeyToken=7
a825a48ad9bf13b oder eine Abhängigkeit davon wurde nicht gefunden. Das System ka
nn die angegebene Datei nicht finden.
Dateiname: Futureware.MantisConnect, Version=1.0.2004.240, Culture=neutral, Publ
icKeyToken=7a825a48ad9bf13b
   bei NAnt.Contrib.Tasks.MantisConnect.MantisSubmitTask..ctor()

WRN: Protokollierung der Assemblybindung ist AUS.
Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie
den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1
festlegen.
Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen
Leistungseinbuße.
Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\S
oftware\Microsoft\Fusion!EnableLog] entfernen.

   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicO
nly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean&
bNeedSecurityCheck)
   bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCac
he)
   bei System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVis
ibilityChecks, Boolean fillCache)
   bei System.Activator.CreateInstance(Type type, Boolean nonPublic)
   bei System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder bi
nder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   bei System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Bind
er binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   bei System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignore
Case, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo cultur
e, Object[] activationAttributes)
   bei NAnt.Core.TaskBuilder.CreateTask()
   bei NAnt.Core.TypeFactory.CreateTask(XmlNode taskNode, Project proj)
   bei NAnt.Core.Project.CreateTask(XmlNode taskNode, Target target)
   bei NAnt.Core.Target.Execute()
   bei NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   bei NAnt.Core.Project.Execute()
   bei NAnt.Core.Project.Run()

Please send bug report to nant-developers@lists.sourceforge.net.

Total time: 0.3 seconds.
Terko
Posts: 14
Joined: 13 Jan 2010, 14:25

Re: Automatic Bugtracker report by incoming Emails

Post by Terko »

Allright, im getting closer again ;)

but still not final
(Futeware.MantisConnect.dll was missing in the nant/bin folder)

Code: Select all

NAnt 0.85 (Build 0.85.2478.0; release; 14.10.2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/Dokumente und Einstellungen/Admin/sample.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: test


test:


BUILD FAILED

C:\Dokumente und Einstellungen\Admin\sample.build(5,3):
Failure connecting to Mantis.
Id = '0'
Category = 'ObjectRef( 0, 'Build' )'
Summary = 'Nighty Build Failed'
Description = 'Nightly build failed during unit testing.'
Product Version = ''
Product Build = ''
Steps to Reproduce = 'Checkout using tag 20040919, and run the build script.'
Additional Info = ''
Project = ObjectRef( 0, 'Testprojekt' )
Reported By =
Assigned To =
Reproducibility = ObjectRef( 0, '' )
Status = ObjectRef( 0, '' )
Priority = ObjectRef( 0, 'normal' )
Severity = ObjectRef( 0, 'major' )
Resolution = ObjectRef( 0, '' )
Projection = ObjectRef( 0, '' )
Eta = ObjectRef( 0, '' )
View State = ObjectRef( 0, '' )
Sponsorship Total = '0'
Fixed in Version = ''
OS = 'Win XP Pro'
OS Build = 'SP2'
Platform = 'i386'
Date Submitted = '14.01.2010 13:46:41'
Last Updated = '14.01.2010 13:46:41'

    Error Type: ,
    Error Description:
    Function ereg() is deprecated,
    Stack Trace:
    Arraynusoap.php L3657 ereg()
    mantisconnect.php L1418 service('<?xml version="1.0" encoding="utf-8"?><soap
:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://futureware.biz/mant
isconnect" xmlns:types="http://futureware.biz/mantisconnect/encodedTypes" xmlns:
xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/200
1/XMLSchema"><soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/enco
ding/"><tns:mc_config_get_string><username xsi:type="xsd:string">administrator</
username><password xsi:type="xsd:string">root</password><config_var xsi:type="xs
d:string">status_enum_string</config_var></tns:mc_config_get_string></soap:Body>
</soap:Envelope>')


Total time: 1.8 seconds.
Post Reply