← Back to team overview

mahara-contributors team mailing list archive

[Bug 1499122] A change has been merged

 

Reviewed:  https://reviews.mahara.org/5568
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/acfa725937c99b586a0fc31fc3e5523f6549b647
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    15.10_STABLE

commit acfa725937c99b586a0fc31fc3e5523f6549b647
Author: Son Nguyen <son.nguyen@xxxxxxxxxxxxxxx>
Date:   Wed Oct 21 12:23:15 2015 +1300

Fix sorting threaded comments. Bug 1499122

- Add new column 'threadedposition' to table artefact_comment_comment
- Update the column for existing comments
- Calculate the position for new comments
- Display threaded commented using this for correct order
- Add a behat test
- Fix problems in upgrade script (Bug 1508301)

Change-Id: I607f26fccccee8f761754a41a21c6f58dd74cfb6

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1499122

Title:
  Threaded comments display in the wrong order

Status in Mahara:
  Fix Committed
Status in Mahara 15.10 series:
  Fix Committed
Status in Mahara 16.04 series:
  Fix Committed

Bug description:
  To replicate:

  1. Clean install of Mahara
  2. In the "No institution" settings, turn on threaded comments. Leave the comment sort order on the default "ascending"
  3. Create a page
  4. Leave about 10 comments on the page. Don't make any of them be replies.

  Expected result: Because the comments aren't replies, they should be displayed on the page in the order they were created
  Actual result: After the first few comments are posted, comments will start showing up at the top of the list of comments

  The reason for this is because the sortorder for "threaded ascending"
  is (artefact.path, artefact.ctime, id). Since artefact.path is a
  string, and gets sorted in alphabetical order, when the artefact IDs
  go from 1 digit to 2 digits, the 1 digit ones will start sorting below
  the 2 digit ones. I.e. "/11" comes before "/6", in string sorting
  order.

  A similar thing will happen if threaded comments are sorted in
  descending order.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1499122/+subscriptions


References