AddItemExternal.aspx

If you are having a problem using Dragnet, post a message here.

Moderator: SourceGear

Locked
Marc
Posts: 29
Joined: Fri Jan 02, 2004 3:47 pm
Location: Hudson, MA
Contact:

AddItemExternal.aspx

Post by Marc » Wed Dec 15, 2004 4:08 pm

Would it be possible to get either the source for this form, or an example of using AddItemExternal()?

It seems to take the same MantisItem object as AddItem but there doesn't seem to be any documentation as to what the required data is, what the return value represents, etc.

Just seeing a sample would save me a lot of poking around.

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Wed Dec 15, 2004 6:01 pm

I just added the following KB article with some examples for AddItemExternal()

http://support.sourcegear.com/viewtopic.php?t=2568
Mary Jo Skrobul
SourceGear

Marc
Posts: 29
Joined: Fri Jan 02, 2004 3:47 pm
Location: Hudson, MA
Contact:

Post by Marc » Thu Dec 16, 2004 8:33 am

mskrobul wrote:I just added the following KB article with some examples for AddItemExternal()

http://support.sourcegear.com/viewtopic.php?t=2568
Great work. This is exactly what I was looking for.

Marc
Posts: 29
Joined: Fri Jan 02, 2004 3:47 pm
Location: Hudson, MA
Contact:

Post by Marc » Thu Dec 16, 2004 9:20 am

Just a note on the KB. I had to remove the following line to get it to work:

dragnetService.Url = "http://localhost/dragnet";

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Thu Dec 16, 2004 9:24 am

The example URL was supposed to be: "http://localhost/dragnet/dragnetwebservice.asmx"

I updated the article.

Sorry about that.
Mary Jo Skrobul
SourceGear

kbonnin
Posts: 30
Joined: Sat Jan 15, 2005 1:21 pm
Location: Portland, OR
Contact:

More info on Error on AddItemExternal()

Post by kbonnin » Sat Jan 15, 2005 1:29 pm

Hello,

I'm porting my 400 bugs into DragNet and am using AddItemExternal().

I was able to create a VB project, add the web reference and login to the web service. I then created my call to AddItemExternal(), but get back error 1009. Project Permission Denied = 1009.

Here's my code:

Code: Select all

            Dim ret As Integer
            Dim mItem As Dragnet.MantisItem = New Dragnet.MantisItem

            mItem.ProjectID = 1017
            mItem.CategoryID = 1 ' 1 = application

            mItem.Description = "Description "
            mItem.Details = "Details"

            mItem.Version = "build 200" ' Found in
            mItem.PlatformID = 2 ' Windows

            mItem.TypeID = 3

            mItem.AssigneeID = 101
            mItem.Created = "4/19/2004"
            mItem.StatusID = 2
            mItem.Subject = "Subject"

            ret = dn.AddItemExternal(mItem)
That user is an 'admin' and also has developer & Administrator rights to all projects. Through the Dragnet app, that user can create items. Any insights?

thanks, Ken

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Mon Jan 17, 2005 10:04 am

Do you have Add External Items turned on for the projects you are trying to add the items to?

From the Modify Project page, make sure the "Allow External Submissions" checkbox is checked.
Mary Jo Skrobul
SourceGear

kbonnin
Posts: 30
Joined: Sat Jan 15, 2005 1:21 pm
Location: Portland, OR
Contact:

It works!

Post by kbonnin » Mon Jan 17, 2005 12:37 pm

Well, what do you know? It's working great! I knew it had to be something simple.

Locked