Fog Creek Software
Discussion Board




Changing sort order of items within an inquiry?

Presently, the individual items (inquery, reply, replies to reply) are sorted within an inquiry oldest first.

This is driving me crazy!

Is there some setting anywhere (code, .mdb) so I can flip the order and show the most recent addition first?

Bob Walsh
Tuesday, October 12, 2004

http://discuss.fogcreek.com/fogbugz/default.asp?cmd=show&ixPost=3408&ixReplies=8

Dmitri
Fog Creek Software
Tuesday, October 12, 2004

That workaround does not change the order items in an inquery are sorted. They are still in oldest first order. And yes, I restarted IIS.

Bob Walsh
Wednesday, October 13, 2004

I think you may be referring to just the way the user sent you the email.  If they replied to your email and put their reply at the bottom of the message then that's how FB will show it.  We just show you the message like any other email client...  We don't sort the contents of each individual message.

Michael H. Pryor
Fog Creek Software
Wednesday, October 13, 2004

Nope.

I'm talking about the order of each email as a whole within a single

Example:

Inquery 574 has the email I received dated "Sun, 10 Oct 2004 00:22:25 -0500 " and the email I repled, dated "Sun, 10 Oct 2004 05:09:59 -0700 "

I want all items sorted within each Inquery newest on top. In this case, I want to see these two items in this order

1.Sun, 10 Oct 2004 05:09:59 -0700
2. Sun, 10 Oct 2004 00:22:25 -0500

Clear?

Bob Walsh
Wednesday, October 13, 2004

Ok, then the source code modification in the discussion group that Dmitri pointed to will change that order (and also the order which items appear when you enter events to an existing case).

Michael H. Pryor
Fog Creek Software
Wednesday, October 13, 2004

Been there, tried that and it did not work. Restarted IIS too. This is the code I modifed:

If bOrderAscending Then
            sql = sql &  "  ORDER BY dt, ixBugEvent"
        Else
            sql = sql &  "  ORDER BY dt , ixBugEvent "
        End If
        
        Dim cmd
        Set cmd = NewCmd( sql )
        
        cmd.Parameters.Append cmd.CreateParameter("ixBug", adInteger, adParamInput, , ixBug)
        Set m_rs = cmd.Execute(,,adcmdText)

        ' see bug #3416
        sql =             "    SELECT sChanges " & _
                         "      FROM BugEvent " & _
                         "    WHERE ixBug = ? " & _
                         "      AND ixBug > 0 "
        If bOrderAscending Then
            sql = sql &  "  ORDER BY dt, ixBugEvent"
        Else
            sql = sql &  "  ORDER BY dt , ixBugEvent "
        End If
        
        Set cmd = NewCmd( sql )

I don't know your app from the inside out, but does CBugEventList.asp handle inqueries or bugs? I am talking about Inqueries.

Bob Walsh
Wednesday, October 13, 2004

Sorry about that, the instructions were inaccurate.

Find this line, just a little higher up on the page:

    Public Function Load( ixBug, bOrderAscending )

On the line below it, add this line:

        bOrderAscending = False

That'll do it!

That file handles all cases, including inquiries. The changes you're making should not require restarting IIS.

Dmitri
Fog Creek Software
Thursday, October 14, 2004

Dmitri is correct.. my earlier suggestion in that thread was inaccurate.  You do need the DESC keyword in both of those places...

Michael H. Pryor
Fog Creek Software
Thursday, October 14, 2004

*  Recent Topics

*  Fog Creek Home