Ticket #917 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Chat messages displayed alphabetically, not by timeline.

Reported by: stevem@… Owned by: gracinet
Priority: P1 Milestone: CPS 3.4.0
Component: CPSChat Version: 3.3.6
Severity: normal Keywords:
Cc: jschmitz

Description

Hi, I'm using the svn checkout, last updated on Sept 9 with Zope 2.8.1

I submitted another ticket relating to roles on the chat. This could be related somehow, although I doubt it.

The order of the discussions displayed in the Chat screen seems to be wrong.

Example - a 2 person chat with both logged in at once for real-time chat, not using the Reply to message command.

If 2 people in a Chat post messages to each other, the messages are displayed in alphabetical order in the Chat frame.

The messages should be displayed in Time/date order shouldn't they? (except replies)

regards Steve Meaker

Change History

comment:1 Changed 14 years ago by janguenot

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from CPS 3.2.5 to CPS 3.3.6

fixed in [26867]

comment:2 Changed 14 years ago by jschmitz

  • Status changed from closed to reopened
  • Version changed from 3.3.5 to 3.3.6
  • Resolution fixed deleted
  • Milestone changed from CPS 3.3.6 to CPS 3.3.7

ordering is supposed to be done by timeline, but I think it only worked by accident in some cases. I developed a patch which works for me here it is:

7-CPSChat$ diff Chat.py.org Chat.py 
17c17
< # $Id$
---
> # $Id: Chat.py 26895 2005-09-14 17:40:58Z janguenot $
126a127,132
>     def compareDates(self,x,y):
>         if x.CreationDate() < y.CreationDate():
>             return -1
>         elif x.CreationDate() > y.CreationDate():
>             return +1
>         return 0
139,147d144
<                 # Order them by creation date because BTree folders
<                 # are not ordered
<                 i = 0
<                 for elt in list:
<                     if post.CreationDate() > elt.CreationDate():
<                         list.insert(i, post)
<                         break
<                     i += 1
<                 if i == 0:
148a146,148
>         # Order them by creation date because BTree folders
>         # are not ordered
>         list.sort(self.compareDates) 

comment:3 Changed 14 years ago by fguillaume

  • Milestone changed from CPS 3.3.7 to CPS 3.4.0

comment:4 Changed 14 years ago by gracinet

  • Status changed from reopened to new
  • Owner changed from trac to gracinet

comment:5 Changed 14 years ago by gracinet

  • Cc jschmitz added
  • Status changed from new to closed
  • Resolution set to fixed

Should be fixed in [29599]. Thanks for the report/patch !

Note: See TracTickets for help on using tickets.