Page MenuHomePhabricator

Watchlist "2 hours" option redisplays as "1 hour"
Closed, ResolvedPublic

Description

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.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

John_of_Reading raised the priority of this task from to Needs Triage.
John_of_Reading updated the task description. (Show Details)
John_of_Reading subscribed.

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

matmarex subscribed.

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

https://gerrit.wikimedia.org/r/254373

@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

https://gerrit.wikimedia.org/r/254373

Change 254880 had a related patch set uploaded (by Bartosz Dziewoński):
Special:Watchlist: Add user preference to "Show last" options, fix float comparison

https://gerrit.wikimedia.org/r/254880

Change 254880 merged by jenkins-bot:
Special:Watchlist: Add user preference to "Show last" options, fix float comparison

https://gerrit.wikimedia.org/r/254880

Fixed and deployed.