Page MenuHomePhabricator

Ability to archive a section based on a template status, additional to age
Open, HighPublicFeature


To extend the use of this script, it would be useful if was able to detect and act on the status of a template to determine whether a section can be archived.

For example for stewards, could get archiving based on certain parameters set in [[m:Template:Status]]; similarly [[m:Spam blacklist]] could archive posts based on the available resolution states used there. So I am thinking that there could be the ability to set an additional parameter that reads the template name, and have the states of the template that would allow archiving (either as part of the parameter or as an additional parameter), and still based on the age algorithm.

Thanks for your consideration of this suggestion.

Tentative specification:

The algo parameter currently accepts the syntax "algo = old(30d)" only. It could be enhanced to accept more complex arguments to support templates indicating the status of the thread.

One natural way to support it would be to accept the two kinds of conditions by introducing logical operators. For example, it could be something like "algo = old(30d) OR marked(done) OR marked(not done)" where "marked(done)" means that threads with a template called {{done}} should be archived even if it's not old enough.



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:41 AM
bzimport set Reference to bz70249.
bzimport added a subscriber: Unknown Object (????).
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 28 2015, 12:15 PM
Dalba added a subscriber: Dalba.Nov 28 2015, 12:15 PM
revi added a subscriber: revi.Mar 30 2016, 6:37 PM
MarcoAurelio updated the task description. (Show Details)Jul 21 2016, 3:48 PM

I would also welcome such a change, along with T119791. I think should be working more like SpBot, which allows different leveling of archives and early archival of threads marked with certain template. Thanks.

whym added subscribers: Euku, whym.Sep 19 2016, 10:14 AM

I wonder if @Euku (developer of SpBot) can contribute to, or at least publish SpBot's source code so that we can reuse/learn from it.

binbot added a subscriber: binbot.Sep 19 2016, 10:26 AM

Hungarian Wikipedia uses this template to prevent the section being archived even if expired:
It may have a parameter.
Currently we use an individual workaround for that, but we woluld like to do this with the framework.

The modified Hungarian script's code is available on Tool Labs:

Mpaa added a subscriber: Mpaa.Sep 29 2016, 8:57 PM

@Tacsipacsi, you can submit a patch.
Ideally, the template should be generic and configurable somehow.

This will be useful for noticeboards that records requests that ought not be archived until it have been actioned. That is, do not archive this section until {{done}} or {{not done}} is there. I wonder if we can raise the priority on this one or have another group of people (Community-Tech?) giving a hand here. Thanks.

Euku removed a subscriber: Euku.Sep 24 2017, 4:37 PM
MarcoAurelio added subscribers: Xqt, valhallasw.EditedNov 22 2017, 9:57 AM

@Xqt @valhallasw Is this task eligible for Google-Code-in-2017? If so, would you like to mentor it?

Ping also @jayvdb and @Legoktm as they're registered in the MediaWiki GCI page.

Being bold and proposing this for GCI.

[ removing Google-Code-in-2017 as this is not under good first task either and as nobody volunteered for mentoring ]

whym updated the task description. (Show Details)Apr 8 2018, 1:42 AM

I added some details into the description which might help people implement this idea.

binbot added a comment.EditedApr 8 2018, 5:45 AM

Please consider that

  • {{done}} or any similar template may have parameters (at least |~~~~)
  • some delay may be neccessary and should be implemented (we don't want people to mark sections as done at 2:00 am and the bot to archive them at 3:00 am before anybody could have seen the changes). I think it So "algo = old(30d) OR marked(done|2d) would be better (where | is not neccessarily the best choice for separator character)
  • {{done}} or any similar template also may appear in an inactive position (HTML comment, nowiki, quoting template etc.).
whym added a comment.Apr 8 2018, 11:08 AM
  • some delay may be neccessary and should be implemented (we don't want people to mark sections as done at 2:00 am and the bot to archive them at 3:00 am before anybody could have seen the changes). I think it So "algo = old(30d) OR marked(done|2d) would be better (where | is not neccessarily the best choice for separator character)

One way to do that might be "algo = old(30d) OR (old(2d) AND (marked(done) OR marked(not done)))", if a parser is adequately implemented.

Allowing such a flexible syntax might be an overkill for the purpose of, though. It might be sufficient (and easier to implement) to support a more limited one.

The current huwiki system takes {{függőben}} into account on every talk page; I think this system should be kept (by storing a wiki default in the archivebot config).
@binbot The current code takes also “inactive” positions into account. (I don’t know whether it’s good or bad.)

whym added a comment.Apr 10 2018, 3:10 PM

@Tacsipacsi Do you think T191901 addresses that? Allowing to set a wiki-wide default setting sounds like a good idea, but a separate one.

If this task will mean that any local config replaces the defaults (which seems very likely for me), than not: most talk pages have the algo parameter set, which would override this setting. Maybe we shouldn’t store the config, but simply pass it using a command line argument, as the current method for getting the archive config page.

Hello. Was already a path for this task decided? Best regards.

Dvorapa changed the subtype of this task from "Task" to "Feature Request".Apr 18 2020, 8:26 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptApr 18 2020, 8:26 PM
Draceane rescinded a token.
Draceane awarded a token.
Tacsipacsi raised the priority of this task from High to Needs Triage.Apr 18 2020, 10:18 PM

It’s not impossible that I’ll submit a patch some time, but having priority set to high without an assignee and without any progress for years is quite misleading for the time being. I don’t know why it was set by @jayvdb in the first place (maybe he planned to work on this back in 2014?).

Dvorapa triaged this task as High priority.Apr 18 2020, 10:42 PM

This is a pretty important issue to be solved, just Pywikibot team lacks people and time

High – Someone is working or planning to work on this task soon.

I don’t think this is the case here.

Dvorapa added a comment.EditedApr 18 2020, 11:56 PM

Does Pywikibot team have to follow this? We usually prioritize tasks by triaging them by priority. We could have High, Medium, Low and Lowest columns on Pywikibot dashboard I suppose, but this is much easier.

This document has “Phabricator” in its title, and no other product name. It seems pretty obvious for me that it therefore applies to all projects tracked on Phabricator. Pywikibot can ignore it of course, but don’t be surprised if people still follow its instructions even for Pywikibot tasks.