I noticed that topics sort order in OA Discussion Section looks a little bit strange: a topic with a reply stays always as first one as it was the latest one published (which it isn't).

I made a test publishing four different topics in the same day (with a time-frame window of few mintues between them) and the first published topic stays in top position just because, comparing with the others ones, it has gained a reply (comment).

First issue: an old topic with a Reply (Comment) is showed first (at top) in the list compared with newer topics that haven't any Reply (Comment).

Second issue: newer topics - ones published and without any received comment - stay below the top one that has a comment (AFAIK newer topics stay below that one really without any particular logical timing order, nor older down neither older up).

Is this by design?

These two sorting issues (which, as far I can see, look like a general sorting issue) make the topic list reading really counter-intuitive and difficult (users expect to find recent activity on top as found in other part of OA where content is displayed in a list and sorted or where it could be eventually filtered).

Shouldn't be that - generally speaking - the newest (published/commented) topic is always shown at top of the topics list?

I mean in a LIFO fashion where the Latest published - or eventually the latest commented - will always show up as the first one in the topic list...and so will always be the higher one.

I suspect that "Discussion sort order incorrect (sort by 'Last updated child/parent' is broken)" issue was not fully solved or, at least, the topic sort order still should be checked again against OA 2.41.

Thanks, Davide.

Comments

dpoletto’s picture

Issue summary: View changes
dpoletto’s picture

Issue summary: View changes
hefox’s picture

Correct, it does look wrong -- it's sorting by max (comment date), which will be null for commentless items and thus they fall to bottom. Will wait for mpotter to comment, as I recall when creating that view, I just copied the existing one and tried to match filter for filter, sort for sort, but that does seem very wrong. To my thinking also, should be latest comment updated date or publish date (whichever exists).

leo_g’s picture

Version: 7.x-2.41 » 7.x-2.42

Updated version to 7.x-2.42 because this is still an issue. Also thought about setting this to major, because it breaks all topic lists!

I don't know if it changed because i skipped v2.41 but the views are sorted by `(Comments) MAX(Comment: Last updated date) (desc)` now...

mpotter’s picture

Yes, this is wrong. It was actually a problem in the older versions also so when the code was copied to make it work with comments instead of replies that problem was just propagated into the new version also. We'll take a look at it. It should definitely use latest comment date or main post updated/created date, whichever exists.

hefox’s picture

Category: Support request » Bug report
Status: Active » Fixed

That was .....fun. It should now be sorted by max comment date or node changed if no comments (in -dev).

Aggragation makes things interesting.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.