With [#1549], it's now possible to set sticky flag for a thread, but threads are not sorted by it actually. That's because:
class ForumController(DiscussionController): @expose('jinja:discussion/index.html') def index(self, threads=None, limit=None, page=0, count=0, **kw): if self.discussion.deleted and not has_artifact_access('configure', app=c.app)(): redirect(self.discussion.url()+'deleted') limit, page, start = g.handle_paging(limit, page) threads = DM.ForumThread.query.find(dict(discussion_id=self.discussion._id)).sort('mod_date', pymongo.DESCENDING) return super(ForumController, self).index(threads=threads.skip(start).limit(int(limit)).all(), limit=limit, page=page, count=threads.count(), **kw)
I.e., the list is sorted just on mod_date (which brings own problems, sent mail to the allura list), nothing else.
What should be said that there's Forum.threads property, which returns threads in the order according to flags, but in its turn, doesn't order by date. Also, its efficiency leaves much to be desired (it unions thread groups in python space).
So, something full-functional and efficient should be devised instead.
Log in to post a comment.