I was using that method but did not like sending the password along with the submitted bug. For various reasons, we are using the internal BugTracker password system and not LDAP authentication, so their BugTracker passwords are not known to us. In my case, all of our users are authorized to submit bugs, and their login is their LAN ID. So, from their authenticated instance of the application, I collect their reported issue, capture the project ID, program and class where they are reporting the issue, and call a stored procedure in the BugTracker DB to directly insert the item.
The negative of course is that this is directly into the database and potentially could cause issues with future upgrades, but it is working well for us now.
(SQL2005/2008)
CREATE PROCEDURE [dbo].[Add_Bug]
@strUsername as varchar(20) = '',
@intProjID as integer = 0,
@strSubject as varchar(200),
@strComment as text
AS
BEGIN
SET NOCOUNT ON;
declare @us_id as integer
declare @us_org as integer
declare @st_id as integer
declare @priority as integer
declare @category as integer
declare @errorreturn as integer
declare @assigneduser as integer
declare @newbugid as integer
if (@intProjID = 0 or RTRIM(@strUsername) = '')
RETURN -1
set @priority = 3 -- default to LOW
set @category = 1 -- default to bug
-- look up us_id, us_org from users where us_username = 'lanid'
set @us_id = 0
BEGIN TRY
BEGIN TRANSACTION
select @us_id = us_id, @us_org = us_org from BugTracker.dbo.users
where us_username = @strUsername
if (@@ROWCOUNT = 0 or @us_id = 0 )
BEGIN
-- set to default values to allow entry anyway
-- if not found default to the autobug reporter
-- this is a separate account created just for these reports
set @us_id = 36
set @us_org = 6
END
select @assigneduser = pj_default_user from projects
where pj_id = @intProjID and
pj_auto_assign_default_user = 1
if (@@ROWCOUNT <> 1)
set @assigneduser = NULL
-- get default status as st_id from statuses where st_default = 1
select @st_id = st_id from BugTracker.dbo.statuses where st_default = 1
-- now insert the bug and post comments
insert into bugs (bg_short_desc, bg_reported_user, bg_reported_date,
bg_status, bg_priority, bg_org, bg_category, bg_project,
bg_assigned_to_user, bg_last_updated_user, bg_last_updated_date)
values ( @strSubject, @us_id, getdate(), @st_id, @priority, @us_org,
@category, @intProjID, @assigneduser, @us_id, getdate())
if @@ERROR <> 0
BEGIN
ROLLBACK TRANSACTION
END
ELSE
BEGIN
select @newbugid = @@IDENTITY
insert into bug_posts (bp_bug, bp_type, bp_user, bp_date,
bp_comment, bp_hidden_from_external_users)
values (@newbugid, 'comment', @us_id, getdate(), @strComment, 0)
if @@ERROR <> 0
ROLLBACK TRANSACTION
END
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
RETURN -2
END CATCH
IF (@@TRANCOUNT > 0)
COMMIT TRANSACTION
RETURN @newbugid
END