Module talk:XfD old

Latest comment: 9 months ago by Anomie in topic TFD level 5 heading bug

Feature request: monthly totals edit

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 {{#invoke:XfD old/sandbox|bymonth}} 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 Feb Mar Apr May Total
CfD 0 0 36 28 64
TfD 0 0 0 3 3
MfD 0 0 2 0 2
FfD 0 0 2 1 3
RfD 0 0 37 40 77
AfD 0 0 0 2 2

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 edit

@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 Feb Mar Apr May Total
CfD 0 0 36 28 64
TfD 0 0 0 3 3
MfD 0 0 2 0 2
FfD 0 0 2 1 3
RfD 0 0 37 40 77
AfD 0 0 0 2 2

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
Thanks, @DannyS712. I prefer preserving the one-venue-per-line format, which I have demoed at Template:XFD backlog/sandbox2 and included in Template:XFD backlog/testcases.
What do you think of that? --BrownHairedGirl (talk) • (contribs) 08:57, 13 April 2019 (UTC)Reply
@BrownHairedGirl: I think it looks odd to include them so far to the right. Thats why I added the border, to delineate between the formats. That being said, I'm not particularly attached to my format, so if you think one-venue-per-line is better, I'm okay with that. However, can I suggest adding the border, and/or centering the totals? --DannyS712 (talk) 08:59, 13 April 2019 (UTC)Reply
XFD backlog
  Feb 2024 Mar 2024 Apr 2024 May 2024 TOTAL
CfD 0 0 36 28 64
TfD 0 0 0 3 3
AfD  
MfD  
@DannyS712, now centered, but look at Template:XFD backlog/sandbox3, shown right and added to testcases. Includes totals for all venues. --BrownHairedGirl (talk) • (contribs) 09:26, 13 April 2019 (UTC)Reply
XFD backlog
  Feb Mar Apr May TOTAL
CfD 0 0 36 28 64
TfD 0 0 0 3 3
AfD  
MfD  
Better still, @DannyS712, here is Template:XFD backlog/sandbox4, shown left and added to testcases. Totals for all per v3, but omits the year to reduce bulk. I really like this. --BrownHairedGirl (talk) • (contribs) 09:34, 13 April 2019 (UTC)Reply
@BrownHairedGirl and DannyS712: You do realize that I coded a module that handles monthly totals for AfD and MfD a month ago. (FYI, I'm neutral between v4 and v3, and prefer them over v2/v1). * Pppery * fades away 15:45, 13 April 2019 (UTC)Reply
Duh. Sorry @Pppery, I had forgotten that. Brain fog.
That's be Module:XfD old/AfD and MfD. Its undocumented, so please can you remind me again of the syntax for a) individual month, b) overall total. --BrownHairedGirl (talk) • (contribs) 15:53, 13 April 2019 (UTC)Reply
@BrownHairedGirl: {{#invoke:XfD old/AfD and MfD|afd/mfd}}, {{#invoke:XfD old/AfD and MfD|afd/mfd|month=total}} (the later being a new feature I added just now) * Pppery * fades away 16:27, 13 April 2019 (UTC)Reply
Thanks again, @Pppery. I have now updated {{XFD backlog}} with Template:XFD backlog/sandbox4, modified to use {{#invoke:XfD old/AfD and MfD|afd/mfd}}. --BrownHairedGirl (talk) • (contribs) 16:35, 13 April 2019 (UTC)Reply
@BrownHairedGirl and Pppery: I agree that sandbox4 is the best. Thanks so much --DannyS712 (talk) 18:27, 13 April 2019 (UTC)Reply

June 2019 edit

XFD backlog
V Feb Mar Apr May Total
CfD 0 0 36 28 64
TfD 0 0 0 3 3
MfD 0 0 2 0 2
FfD 0 0 2 1 3
RfD 0 0 37 40 77
AfD 0 0 0 2 2

@BrownHairedGirl, Pppery, and DannyS712: I'm not sure what was the result of the discussion above, but the current version of the template (to the right) does not include 19 articles from Category:AfD debates (Media and music) in the AfD count, for example. At least one discussion started on 22nd of June, and is still open. —⁠andrybak (talk) 18:46, 24 June 2019 (UTC)Reply

@Andrybak: This template, by design, only includes discussions that have been open for more than seven days and thus should be closed by an uninvolved admin. * Pppery * it has begun... 18:49, 24 June 2019 (UTC)Reply
Does this clarification help? —⁠andrybak (talk) 18:52, 24 June 2019 (UTC)Reply
Fine by me. --BrownHairedGirl (talk) • (contribs) 19:11, 24 June 2019 (UTC)Reply

Template-protected edit request on 1 May 2019 edit

Please replace with the current version of the sandbox (diff). This wraps the list outputs with {{Div col}} to reduce the height of the display and eliminate extraneous whitespace by using multiple columns. The results can be seen at the current #Testcases section above. Thanks, --DannyS712 (talk) 08:39, 1 May 2019 (UTC)Reply

  Not done This is out of scope for the module; it should be added to Wikipedia:Categories for discussion/Awaiting closure instead, if you can find consensus to do so there. * Pppery * has returned 11:40, 1 May 2019 (UTC)Reply

Well, can't add FfD right now... edit

...Since their subpages do not include ".../Log/...". I'll have to see where this leads as I may try to change that. Steel1943 (talk) 18:54, 2 May 2019 (UTC)Reply

@Steel1943: it is possible, just requires a different approach. I'll work on it - I have some ideas --DannyS712 (talk) 18:55, 2 May 2019 (UTC)Reply
Awesome ... since the problem is clear, but I just don't know how to Lua. But, that may change by the end of this year. ☺️ Steel1943 (talk) 18:56, 2 May 2019 (UTC)Reply
@Steel1943 and DannyS712: If you're trying to add FfD, the bigger problem is that the bot doesn't create Wikipedia:Files for discussion/Old unclosed discussions. I could write code to handle the lack of the "/Log" fairly easily, but Anomie would need to make his bot create the /Old unclosed discussions subpage first. * Pppery * the end 21:10, 2 May 2019 (UTC)Reply
@Pppery: why would you need /Old unclosed discussions? you can retrieve the count of unclosed discussions by parsing Wikipedia:Files for discussion#Old discussions --DannyS712 (talk) 21:13, 2 May 2019 (UTC)Reply
@DannyS712: Because I don't want to right any more special-case code than I have to. * Pppery * the end 21:14, 2 May 2019 (UTC)Reply
@Pppery: Well, I'd like to try writing it - given that there are only 6 "cases" total (A/M/R/T/C/F xd), I don't think its a big deal to have different code for ffd. Since it doesn't have backlogs like cfd and tfd do, it only needs a "total" count. --DannyS712 (talk) 21:18, 2 May 2019 (UTC)Reply
@DannyS712: At one point, WP:FFD had a 6-month backlog, so just providing a "total" may not be sufficient, especially if the administrators moderating FfD at this time go on to other tasks. Steel1943 (talk) 21:22, 2 May 2019 (UTC)Reply
Let me see what I can do with just a total, and then try to add that --DannyS712 (talk) 21:22, 2 May 2019 (UTC)Reply
(edit conflict) @DannyS712: FFD has had huge backlogs in the past. There's no reason to expect the backlog not to grow again. It makes much more sense to me to incorporate FfD into the main framework of the module, given that it is easily incorporable into the framework of the module, then to have to write special-case code for everything; that's why I wrote this module to begin with. * Pppery * the end 21:24, 2 May 2019 (UTC)Reply
If consensus at WT:FFD is in favor of Wikipedia:Files for discussion/Old unclosed discussions, that could be done easily enough. Anomie 21:25, 2 May 2019 (UTC)Reply

Discussion transcluded to Wikipedia talk:Files for discussion. * Pppery * the end 21:32, 2 May 2019 (UTC)Reply

Section edit links edit

The lack of section edit links in transcluded discussions is causing problems for XFDcloser, see WT:XFDC#On Wikipedia:Files for discussion.... It also makes finding and editing these discussions a bit less convenient. I've added code to the module sandbox that will find the section number and add an edit link for each transcluded discussion. Testing in edit preview mode of WP:FFD#Old discussions and WP:TFD#Old discussions shows only a slight increase in Lua time/memory usage. Is there any objection to adding these edit links, or any thoughts on how they should be styled? - Evad37 [talk] 01:24, 4 November 2019 (UTC)Reply

That would be great! A small but useful convenience that I would gladly pay a small Lua time penalty for. ‑‑Trialpears (talk) 12:54, 8 November 2019 (UTC)Reply
  Done - Evad37 [talk] 02:22, 10 November 2019 (UTC)Reply

Empty columns edit

With regard to edits like these: Special:Diff/982967202, Special:Diff/981216068. Should we automate this through a module, which checks the sum in columns? —⁠andrybak (talk) 14:18, 23 October 2020 (UTC)Reply

The solution to this is to not have 4-month-backlogged deletion discussion venues. * Pppery * it has begun... 14:21, 23 October 2020 (UTC)Reply

Inclusion of RfD edit

@Tavix: unless and until the actual RFD values can be included, I don't believe that an empty row should be shown. Would you please revert your edit pending discussion and consensus regarding such inclusion? I'm not going to revert myself since it would be an abuse of template editor rights, though I guess the guidance at Wikipedia:Template editor doesn't apply to admins? --DannyS712 (talk) 05:23, 25 October 2020 (UTC)Reply

It is certainly useful to include RfD given that all other XfD fora are also shown, even if there are currently blank values. I agree that a more-perfect solution would be to have the actual values in place, but having that blank space would help to encourage development of the module to include RfD if someone who is technically capable would be so inclined. In the meantime, a convenient link to RfD is in place so someone who is curious about the backlog there can check to see what it looks like for themselves, and a fuller picture of the actual XfD backlog can be realized. -- Tavix (talk) 05:33, 25 October 2020 (UTC)Reply
I find it really ugly to have a blank row, but it really should be added when it actually works. The guy to ask here is probably Anomie since the module requires Wikipedia:Redirects for discussion/Old unclosed discussions to exist which is handled by their bot for the other venues. --Trialpears (talk) 23:37, 27 October 2020 (UTC)Reply
It seems pretty weird to have RfD missing. It needn't be totally blank if there's no backlog; have it do "n/a" or something.  — SMcCandlish ¢ 😼  21:27, 4 December 2020 (UTC)Reply
It isn't that there's no backlog at RfD but that we can't know if there's a backlog using a template. Before RfD can be added in a meaningful way AnomieBOT has to generate Wikipedia:Redirects for discussion/Old unclosed discussions which I'm guessing would require some additional work due to a different formatting of discussion pages. --Trialpears (talk) 10:07, 5 December 2020 (UTC)Reply
15 months later, I finally got around to adding RfD (with proper numbers) to this template. * Pppery * it has begun... 01:17, 1 February 2022 (UTC)Reply

Template-protected edit request on 6 November 2022 edit

{{XFD backlog}}'s RfD link trolled me by linking to a section that didn't exist, so I'm requesting that the TOC is linked instead:

| [[Wikipedia:Redirects for discussion#{{#time:F j|-8 days}}|{{#invoke:XfD old/AfD and MfD|rfd|month=total}}]]

| [[Wikipedia:Redirects for discussion#toc|{{#invoke:XfD old/AfD and MfD|rfd|month=total}}]]

RAN1 (talk) 03:44, 6 November 2022 (UTC)Reply

  Done * Pppery * it has begun... 04:26, 6 November 2022 (UTC)Reply
@RAN1, @Pppery, this misses the point of that link, which is to take you to the backlog. We already have a link to the top of the page at the left of the table. If you really think it's not generally useful for RFD to link to its backlog, just remove the link instead. Personally, I think it's fine if it's not perfect every once in a while. Izno (talk) 21:42, 7 November 2022 (UTC)Reply
@Izno, @Pppery: I've been thinking about this, and I put together a version at the sandbox which returns a link to the section for the last backlogged discussion (prototype at Template:XFD backlog/sandbox). I'm also bringing this up at WP:VPT for comment. Let me know what you think. RAN1 (talk) 21:34, 11 November 2022 (UTC)Reply
I'm not convinced it's worth adding more complicated code to handle this scenario and prefer either the status quo ante or the original suggestion with no opinion which. * Pppery * it has begun... 23:56, 11 November 2022 (UTC)Reply

Bug at Old discussions at Wikipedia:Templates for discussion edit

There is a bug with the May 25 Old discussions at Wikipedia:Templates for discussion. The first item in the listed templates isn't bulleted like the rest. Gonnym (talk) 05:35, 3 June 2023 (UTC)Reply

  Fixed * Pppery * it has begun... 14:07, 3 June 2023 (UTC)Reply

TFD level 5 heading bug edit

Wikipedia:Templates for discussion/Log/2023 June 23#Template:WIR is a level 4 heading, and it got really big so a level 5 heading called "Break" was added to it. Before I closed it, this module was listing "Break" as an un-closed discussion at Wikipedia:Templates for discussion#Old discussions. It was cutting off and not showing Template:WIR at all. Might be worth fixing. –Novem Linguae (talk) 18:19, 14 July 2023 (UTC)Reply

Not this module's fault. It reads from Wikipedia:Templates for discussion/Old unclosed discussions, which is generated by AnomieBOT. Cc Anomie * Pppery * it has begun... 18:23, 14 July 2023 (UTC)Reply
And for the record it is including the original discussion, including the break, as well as a second unclosed discussion. Anyway there's nothing else I can do here. * Pppery * it has begun... 18:27, 14 July 2023 (UTC)Reply
On occasion people doing mass nominations have used level-5 headings for the actual nominations, grouped under a level-4 heading. Is that something that the bot should continue to support? Anomie 19:50, 14 July 2023 (UTC)Reply