FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

Bug in BugzScout

It seems that if an ampersand is contained anywhere in the description or extra information when submitting to scoutSubmit, all text after and including the ampersand is completely lost by the system.
Brian
Sunday, March 13, 2005
 
 
I see what's happening, the C# BugReport class is not URL encoding the fields before submitting the request.
Brian
Monday, March 14, 2005
 
 
My own class had some changes to fix this in some of the fields but a quick test revealed that it was prone to problems with projects and areas with & in them as well. So much for dilligent testing I suppose :P

My own class have been updated now, and the changes to perform on the class in the fogbugz installation are:

in BugReport.cs, line 61-66, which reads like this:

client.QueryString.Add("Description", this.description);
if (this.extraInformation != null && this.extraInformation.Length > 0) client.QueryString.Add("Extra", this.extraInformation);
if (this.customerEmail != null && this.customerEmail.Length > 0) client.QueryString.Add("Email", this.customerEmail);
client.QueryString.Add("ScoutUserName", this.userName);
client.QueryString.Add("ScoutProject", this.project);
client.QueryString.Add("ScoutArea", this.area);

then each method call needs to use HttpUtility.UrlEncode for the information, which means it'll change to:

if (this.extraInformation != null && this.extraInformation.Length > 0) client.QueryString.Add("Extra", HttpUtility.UrlEncode(this.extraInformation));
if (this.customerEmail != null && this.customerEmail.Length > 0) client.QueryString.Add("Email", HttpUtility.UrlEncode(this.customerEmail));
client.QueryString.Add("ScoutUserName", HttpUtility.UrlEncode(this.userName));
client.QueryString.Add("ScoutProject", HttpUtility.UrlEncode(this.project));
client.QueryString.Add("ScoutArea", HttpUtility.UrlEncode(this.area));

You'll also need to add

using System.Web;

to the top of the file.

Hope this helps.
Lasse Vågsæther Karlsen Send private email
Monday, March 14, 2005
 
 
This will fix the issue and give you correct ampersands when it gets into FogBugz. I just ran into this today myself.

<BugText> = <BugText>.Replace("&", "%26");

%26 will be converted to & once it is posted into FogBugz.
Marc LaFleur Send private email
Monday, March 14, 2005
 
 
I should add, I only suggested this alternative because some people don't want to edit the source and risk loosing it in an update.
Marc LaFleur Send private email
Monday, March 14, 2005
 
 
Good point.
Lasse Vågsæther Karlsen Send private email
Monday, March 14, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.