Fog Creek Software
Discussion Board

Bug: Error on long # string after "case" in entry

I really like the new "shortcuting" of bugs by putting "bug 1234" or "case 1234" in the text of a case to automagically becoming a link to that bug or case.  One of our users found a bug though.

When you enter a long number after the word "case" like "case 123456293923" you get this error in the body of the entry:

<quote error>
Provider error '8002000a'

Out of present range.

/CBug.asp, line 123
</quote error>

I had to edit the entry in the database backend in the BugEvent table to change the word 'case' to 'example'.  The actual text in question looked like this originally:

"You can enter any header if you need. In your case 4444444444, 99999999999999999999999, 6666666666666 are the headers."

Roger Herzler
Tuesday, November 25, 2003

Thanks for the tip.  We'll fix it for the next release.

In the meantime, you can do it yourself if you'd like...

Edit 1.
Add this to the top of the Load function:
        If ixBugInit > 2147483647 Then ' max adInteger size
            Load = False
            Exit Function
        End If

Edit 2. (optional)
In the function ReplaceBugString, move the final part where it says re.Pattern= and sText = up into the If block for oBug.Load, so that it becomes:
    For i = 0 To sizeofmatches(matches) - 1
        If oBug.Load( getSubMatchAt(1, getMatchAt(i, matches)) ) Then


            re.Pattern = sBugPattern & "(" & getSubMatchAt(1, getMatchAt(i, matches)) & ")\b"
            sText = re.Replace( sText, _
                 "<a href=""default.asp?pg=pgEditBug&amp;command=view&amp;ixBug=$2"" title=""" & sTitle & """>$1$2</a>" )
        End If

Michael H. Pryor (fogcreek)
Tuesday, November 25, 2003

*  Recent Topics

*  Fog Creek Home