The watchlist "time period" settings have turned into a drop-down list. Most of the options are preserved when the watchlist displays - select "6 hours" and "Go", and the watchlist is redisplayed with "6 hours" selected. But "2 hours" redisplays with "1 hour" selected.
Description
Details
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Open | None | T119084 Options form at the top of old Special:RecentChanges needs cleanup | ||
Resolved | Florian | T119181 Watchlist "2 hours" option redisplays as "1 hour" | ||
· · · |
Event Timeline
This is because 2/24 = 0,83333... which gets cut to 15 decimals in the html form. But we check the &days= parameter in php to be exactly 2/24 which returns false and so the option doesn't get selected.
Rounding would help here, but isn't it easier to pass the maxage for the watchlist in hours (only integers as url parameters required)?
If only Lee Daniel Crocker, who wrote the first version of this code back in 2003, realized how big Wikipedia is going to grow and that people will want to view changes from time periods smaller than one full day… :)
I'll fix the comparison to use correct rounding and try to get the fix deployed on Monday.
Change 254373 had a related patch set uploaded (by Florianschmidtwelzow):
Special:Watchlist: Add the user preference to the show last select options
@matmarex This bug would be fixed with https://gerrit.wikimedia.org/r/#/c/254373/, too, so I'm free and take the task, ok? :]
Change 254373 merged by jenkins-bot:
Special:Watchlist: Add user preference to "Show last" options, fix float comparison
Change 254880 had a related patch set uploaded (by Bartosz Dziewoński):
Special:Watchlist: Add user preference to "Show last" options, fix float comparison
Change 254880 merged by jenkins-bot:
Special:Watchlist: Add user preference to "Show last" options, fix float comparison