Module talk:XfD old

This is an old revision of this page, as edited by DannyS712 (talk | contribs) at 08:45, 13 April 2019 (MfD and AfD: Replying to DannyS712 (using reply-link)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 6 years ago by DannyS712 in topic MfD and AfD

Feature request: monthly totals

Hey @Pppery, great work creating this module.

I have a feature request: monthly totals.

It looks like it would be a small extra bit of coding, and it would be very handy to have e.g. at WP:Categories for discussion/Working#Discussions_awaiting_closure a quick summary of the form:

  • January 2019: 14
  • February 2019: 589,704
  • March 2019: 26

Even better, if there was a "totals only" parameter, then it could be wrapped in a template to make a wee indicator box for editors and admins to display on their userpages, just as many people display article alerts, WP:CENT etc. --BrownHairedGirl (talk) • (contribs) 00:48, 15 March 2019 (UTC)Reply

PS Even better: if there was a "month" parameter to tally just one month (e.g. "month=201901"), then we could build a combined totals indicator templates for all XFDs which the module support, with a column for the current month and each of the previous three months. --BrownHairedGirl (talk) • (contribs) 00:59, 15 March 2019 (UTC)Reply

@BrownHairedGirl: Is Script error: The function "bymonth" does not exist. what you're looking for? {{3x|p}}ery (talk) 01:33, 15 March 2019 (UTC)Reply

Brilliant, @Pppery.
That's my first request sorted in double-quick time. Thanks.
Would I be pushing my luck to ask if the "month=" param is doable without too much grief? --BrownHairedGirl (talk) • (contribs) 01:38, 15 March 2019 (UTC)Reply
I'm currently in the process of coding this. {{3x|p}}ery (talk) 01:41, 15 March 2019 (UTC)Reply
@BrownHairedGirl: Done. Ex: {{#invoke:XfD old/sandbox|onemonth|month=March 2019|title=Wikipedia:Categories for discussion}} -> 0 {{3x|p}}ery (talk) 01:50, 15 March 2019 (UTC)Reply
Brilliant, @Pppery. Please can it go live? --BrownHairedGirl (talk) • (contribs) 01:54, 15 March 2019 (UTC)Reply

Done. {{3x|p}}ery (talk) 01:56, 15 March 2019 (UTC)Reply

Wonderful, @Pppery!

{{XFD backlog}}

XFD backlog
V May Jun Jul Aug Total
CfD 0 0 6 21 27
TfD 0 0 2 13 15
MfD 0 0 0 2 2
FfD 0 0 0 2 2
RfD 0 0 0 54 54
AfD 0 0 0 0 0

Are there any plans to support MfD and AFD? --BrownHairedGirl (talk) • (contribs) 02:16, 15 March 2019 (UTC)Reply

<discussion continues at #MfD and AfD>

@BrownHairedGirl: You should probably template-protect Module:XfD old; the template being protected but not the module is causing the template to be part of a a tracking category I created. {{3x|p}}ery (talk) 02:43, 15 March 2019 (UTC)Reply

@Pppery: Good idea. Done[1]. --BrownHairedGirl (talk) • (contribs) 02:48, 15 March 2019 (UTC)Reply

MfD and AfD

@BrownHairedGirl: The way the module is currently coded is incompatible with XfD forums that use subpages, so no. It could be theoretically expanded to support FfD and/or RfD if AnomieBOT were updated to create the necessary /Old unclosed discussions pages. {{3x|p}}ery (talk) 02:25, 15 March 2019 (UTC)Reply
@BrownHairedGirl: I've changed my mind about this, and added the monthly backlog functionality for AfD and MfD in a separate module that shares no code with this one. {{3x|p}}ery (talk) 20:31, 15 March 2019 (UTC)Reply
@Pppery: I don't seem to be feeding it the right params. Pls can you show me a query or two? --BrownHairedGirl (talk) • (contribs) 20:48, 15 March 2019 (UTC)Reply
@BrownHairedGirl: {{#invoke:XfD old/AfD and MfD|mfd|month=February 2019}} -> 0. The same syntax works for AfD (use afd instead of mfd), but it would always produce zero right now since there are literally zero AfDs awaiting closure. {{3x|p}}ery (talk) 20:52, 15 March 2019 (UTC)Reply

@Pppery, I have tested this at Template:XFD backlog/sandbox.

{{XFD backlog/sandbox}}

XFD backlog
V May Jun Jul Aug Total
CfD 0 0 6 21 27
TfD 0 0 2 13 15
MfD 0 0 0 2 2
FfD 0 0 0 2 2
RfD 0 0 0 54 54
AfD 0 0 0 0 0

Does this look OK? --BrownHairedGirl (talk) • (contribs) 21:02, 15 March 2019 (UTC)Reply

Yes. {{3x|p}}ery (talk) 21:03, 15 March 2019 (UTC)Reply
@BrownHairedGirl: {{3x|p}}ery (talk) 21:25, 15 March 2019 (UTC)Reply
@Pppery and BrownHairedGirl: well, I just discovered this thread, and thought I should share - Module:Sandbox/DannyS712/count has 2 functions, countMfD and countAfD, that return the total number of unclosed threads from those forums. Since those are usually processed faster, I didn't go through the trouble of splitting it up, but Mathbot updates the AfD count every few hours, and MfD is updated automatically (I think). Would it make sense to add an extra row, of AfD: #, and MfD: # or something? --DannyS712 (talk) 08:35, 13 April 2019 (UTC)Reply
Sounds v useful, @DannyS712. Can you tweak Module:Sandbox/DannyS712/count to do monthly totals? --BrownHairedGirl (talk) • (contribs) 08:41, 13 April 2019 (UTC)Reply
@BrownHairedGirl: that is wayyyy beyond my level of Lua. But, take a look at Template:XFD backlog/testcases for another idea --DannyS712 (talk) 08:42, 13 April 2019 (UTC)Reply
If I get the "green light" to add these, I'll clean up the Lua code and separate out the functions so they cane be added to the lua module already used for the backlog template. --DannyS712 (talk) 08:45, 13 April 2019 (UTC)Reply