Project

General

Profile

Actions

Task #3566

closed

ReleasePlan template logic fails, when the first days of a year are still part of week 52 of the previous year

Added by Beluga Beluga about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Wiki
Target version:
-
Start date:
2022-01-01
Due date:
2022-01-02
% Done:

100%

Tags:

Description

Originally reported as https://bugs.documentfoundation.org/show_bug.cgi?id=146512

You can see my attempt, which was not perfect:
https://wiki.documentfoundation.org/WikiAction/history/Template:Release-plan-background-color-one-week

The problem with my attempt was week 52 of 2021 did not appear as yellow in 7.2.5 release plan on 1 Jan 2022.

You can preview the result live by pasting a Release-plan-bugfix-normal template instance into the <noinclude> section of the Release-plan-background-color-one-week template.

I think the wiki template logic becomes monstrous and insanity-inducing to reason about in this case. It is a stupid language for conducting this sort of business.

Actions #1

Updated by Sergey Shamanayev about 2 years ago

  • Due date set to 2022-01-02
  • Start date set to 2022-01-01
  • % Done changed from 0 to 100

I fixed it

Actions #2

Updated by Beluga Beluga about 2 years ago

Sergey Shamanayev wrote in #note-1:

I fixed it

Thanks, I guess it is better than my attempt, but if you now look at https://wiki.documentfoundation.org/ReleasePlan/7.2#7.2.5_release the row "Week 53 , Jan 3, 2022 - Jan 9, 2022" should be in yellow :)

Actions #3

Updated by Beluga Beluga about 2 years ago

  • Status changed from New to Closed

Your most recent edit seems to solve it, thanks a lot for the work!

Actions #4

Updated by Sergey Shamanayev about 2 years ago

I did a new implementation based on time (not weeks)
Actually "Jan 3, 2022 - Jan 9, 2022" it is week 1 (not 53), so to avoid fixing the existing configuration and to exclude possible configuration errors in the future, I rewrote the script to use the time.
Also I added new template DATE2N https://wiki.documentfoundation.org/Template:DATE2N

P.S. Yes I late post comment due server error

Actions #5

Updated by Beluga Beluga about 2 years ago

Note: the template currently can cause an error and I created a request for WikiMedia, so we could get rid of the error: https://phabricator.wikimedia.org/T299909

Actions

Also available in: Atom PDF