Possible Bug

This forum is now locked, since gold support is no longer offered.

Moderator: SourceGear

Locked
ZackJones
Posts: 131
Joined: Mon Mar 08, 2004 6:30 am
Location: Warner Robins, GA

Possible Bug

Post by ZackJones » Mon Aug 15, 2005 5:47 am

Greetings,

I can't seem to reproduce the exact steps to make the bug happen again but I wanted to call something to your attention.

This morning I was editing some existing comments and ended up on the error.aspx page. Here's what I think the problem may be.

I was on a page and the url was ShowItem.aspx?pid=106&itemid=421

In my comment I added "See Also: Bug 420" since the two items are related. I updated the comment and it was accepted just fine. The odd thing is when you view the comment and hover over the hyperlink that was created in my See Also comment the url for the hyperlink is ShowItem.aspx?pid=0&itemid=420

Notice how pid is not 106 as I would expect.

Also, would you mind telling me how you implemented the automatic hyperlinking when you enter Bug xxx as a comment? I think this feature is really cool and would like to add it to one of my web applications.

I looked at the dragnet log on the server and didn't see any error information logged there. According to the About page I'm using Version 1.0.4.1242

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

Post by mskrobul » Mon Aug 15, 2005 9:25 am

It is difficult what happened to cause the error. Was there an error message on the error page?

The project ID of "0" in the URL is by design. You can link to items in other projects so we don't assume that the item ID typed in is in the current project. Each item ID is unique so we don't need the project ID to display the item. Since we need to fetch all the item details when we load the item details page anyway, when the project ID is 0 we set the project ID from that point on to the project ID associated with the item ID.

As for the automatic hyperlinking, we use the C# Regex class to match patterns in the item details and for each pattern match we replace that match string with the URL. If you would like more information than that, please email me directly (you can use the email button at the bottom of this message) and I will give you some code.
Mary Jo Skrobul
SourceGear

ZackJones
Posts: 131
Joined: Mon Mar 08, 2004 6:30 am
Location: Warner Robins, GA

Post by ZackJones » Mon Aug 15, 2005 3:49 pm

mskrobul wrote:It is difficult what happened to cause the error. Was there an error message on the error page?
I believe the error was something along the lines of The Input was Invalid. I didn't write it down, sorry :(

ZackJones
Posts: 131
Joined: Mon Mar 08, 2004 6:30 am
Location: Warner Robins, GA

Post by ZackJones » Tue Aug 16, 2005 4:59 am

I've found a way to not necessarily reproduce the exact error but a way to consistently produce an error.

On the ShowItem.aspx page simply scroll down to the bottom of the page where you would add a comment and click on the submit button without entering anything. The page is posted back to the server and you end up on the error page. On the error page it reads "The data provided was invalid."

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

Post by mskrobul » Tue Aug 16, 2005 8:14 am

OK. That makes sense. If you just hit submit on the comment form without adding any data you would get an invalid data error.

I have logged a bug to catch this case with page validation.

Thanks for the report :)
Mary Jo Skrobul
SourceGear

Locked