Page MenuHomePhabricator

Incorrect display of return date in Special:MentorDashboard if larger than 9999-12-31
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • (Become a mentor of course)
  • Set a random away days in Special:MentorDashboard which makes return date larger than 9999-12-31
  • Click "Pause"

What happens?:
Date of today shown in (growthexperiments-mentor-dashboard-mentor-tools-mentor-status-away-message)

image.png (435×1 px, 57 KB)

image.png (241×826 px, 23 KB)

What should have happened instead?:
It should not. User should not be allowed to have that kinds of value inputted.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
1.39.0-wmf.2 (8ca144b)

Event Timeline

image.png (128×501 px, 13 KB)

There is already a bound check for integer, but that is not enough.
Or we could let mentors input their estimated return date (via a calendar data selector).

kostajh added subscribers: Urbanecm_WMF, kostajh.

@Urbanecm_WMF maybe we should set an upper limit of 365 days?

Change 772929 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Mentor tools: Set maximum number of days a mentor can be away for to 365

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

@Urbanecm_WMF maybe we should set an upper limit of 365 days?

Good idea – thanks for the ping Kosta. Made a patch, as it is a relatively simple thing to do.

Change 772929 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentor tools: Set maximum number of days a mentor can be away for to 365

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

Etonkovidova subscribed.

Checked on testwiki wmf.5:

  • Invalid input - the warning explains the limit of 365 days

Screen Shot 2022-03-30 at 5.30.27 PM.png (711×1 px, 111 KB)

  • the max number of days to be away is 365
    Screen Shot 2022-03-30 at 5.34.49 PM.png (479×1 px, 79 KB)