Page MenuHomePhabricator

archivebot: allow sorting threads by the first post in the section
Open, LowestPublicFeature

Description

Threads in the original discussion page are often sorted by the first post of each thread. It might be preferable to preserve (or try to preserve) that in archives. It can be necessary to insert threads into somewhere in the middle of an archive to do that, instead of simply appending.

It would be nice if this is configurable by a parameter in the config template. For compatibility, the default behavior should fall back to no sorting (just appending).

Also, when you sort by the first post, I think it makes sense to use the same criterion for selecting time-based archives. For example, threads created in 2020 should go to /2020. (If including this makes the task too large, please feel free to leave it out for later.)

Event Timeline

JJMC89 changed the subtype of this task from "Task" to "Feature Request".Jul 11 2022, 3:30 PM

I thought threads are in that order they are listed on the page. Isn't that right?

There is a already a feature in DiscussionPage.update() to sort threads by the DiscussionThread.timestamp but this feature isn't used currently.

You are right, saying the current behavior is to sort by the last post is wrong. I will change the description and the title.

I believe threads archived in different iterations are not necessarily sorted (at least not by the first post in the thread). I don't see the same problem among threads archived at once.

Example: "Short caption abuse filter" was above "GRP" in https://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard&oldid=658131158. The first thread was created earlier but continued longer. After a few iterations of archiving, the order was reversed in the archive.

whym renamed this task from archivebot: allow sorting threads by the first post in the section, instead of the last to archivebot: allow sorting threads by the first post in the section.Jul 11 2022, 10:05 PM
whym updated the task description. (Show Details)
Xqt triaged this task as Low priority.Thu, Aug 4, 1:56 PM

Change 820469 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Preserve thread order in archive even if threads are archived later

https://gerrit.wikimedia.org/r/820469

Xqt lowered the priority of this task from Low to Lowest.Fri, Aug 5, 5:36 AM

This patch solves this task in most cases except there are threads added on top or in the middle of a talk page.

Change 820469 merged by Xqt:

[pywikibot/core@master] [IMPR] Preserve thread order in archive even if threads are archived later

https://gerrit.wikimedia.org/r/820469