Page MenuHomePhabricator

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

Assigned To
None
Authored By
Billinghurst
Sep 1 2014, 10:20 AM
Referenced Files
None
Tokens
"Like" token, awarded by Draceane."Like" token, awarded by MarcoAurelio."Manufacturing Defect?" token, awarded by Dalba.

Description

To extend the use of this script, it would be useful if archivebot.py 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.

Details

Reference
bz70249

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 (????).

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

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

Hungarian Wikipedia uses this template to prevent the section being archived even if expired:
https://hu.wikipedia.org/wiki/Sablon:F%C3%BCgg%C5%91ben
It may have a parameter.
Currently we use an individual workaround for that, but we woluld like to do this with the framework.

@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.

@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.

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

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

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.).
  • 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 archivebot.py, 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.)

@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
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?).

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.

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.