Page MenuHomePhabricator

Store mentor's away timestamp in a single format
Closed, ResolvedPublic

Description

As spotted in https://en.wikipedia.org/wiki/MediaWiki:GrowthMentors.json the awayTimestamp property is currently stored in two different formats: unix like timestamp "20251213123701" and json iso encoded "2026-08-30T03:08:01Z" . Both are valid MW ConvertibleTimestamp, and the config is validating properly but the discrepancy is undesired as it generates confusion for an admin user that would want to edit a value directly through the json editor.

Acceptance criteria

  • awayTimestamp is stored in a single format
  • The format is the json iso encoded like

Event Timeline

Change #1194641 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Mentorship: store awayTimestamp always in ISO format

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

Sgs moved this task from Inbox to FY2025-26 Q2 Sprint 1 on the Growth-Team board.
Sgs edited projects, added Growth-Team (FY2025-26 Q2 Sprint 1); removed Growth-Team.
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2025-26 Q2 Sprint 1) board.

Change #1194641 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentorship: store awayTimestamp always in ISO format

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

Requirement

All awayTimestamp values in GrowthMentors configuration must use a single format, namely JSON ISO encoded timestamps (e.g. YYYY-MM-DDTHH:MM:SSZ). No entries should remain in the numeric/unix-like format in the UI or in fetched JSON responses.

BDD

Feature: Consistent ISO timestamp format for mentor awayTimestamp  

Scenario: Viewing configuration shows only ISO format  
  Given I am on the GrowthMentors.json page
  When I view the `awayTimestamp` fields  
  Then none should be in numeric / unix-style form  
  And all should appear in  JSON or JSON-like  format

Test Result

Status: ✅ PASS
Environment: beta
OS: macOS Sequoia 15.5
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Case 1: Inspect JSON editor for timestamp format

  1. Open the GrowthMentors configuration JSON
  2. Scroll through all mentor entries and locate awayTimestamp fields
  3. Confirm none are unix-like form
  4. AC1: All awayTimestamp values shown are in JSON or JSON-like format

While not stricly in JSON format, it is not in unix timestamp format.

screenshot 247.png (1×1 px, 272 KB)