Adding a Comment after adding an Item via API

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

Moderator: SourceGear

Locked
birdbuster
Posts: 9
Joined: Thu Mar 29, 2007 10:31 am
Location: Kent,WA

Adding a Comment after adding an Item via API

Post by birdbuster » Wed Apr 04, 2007 9:58 am

I am importing comments into dragnet via API and when I set the MantisItemComment.UID = a Valid Dragnet UserID to shows me in C# that the property got set correctly, but it somehow instead uses the Admin which is the user that I use for my login routine in C# for adding a MantisItemComment.
I am however not setting the MantisItemComment.UserLogin property, not sure if I need to.
my code can be seen at
http://support.sourcegear.com/viewtopic.php?t=7638

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

Post by mskrobul » Wed Apr 04, 2007 10:45 am

Add comment always uses the logged in user's ID for the posted by user (same for AddItem, ModifyItem and all of the web service API calls). Currently there isn't a way to set a different user ID for AddItemComment. I can add this as feature request.

If you are doing an import, you will need to be logged in as the user who you want to post the comment before calling the AddComment API.
Mary Jo Skrobul
SourceGear

Locked