Page MenuHomePhabricator

Add logging to CommunityRequests
Closed, ResolvedPublic5 Estimated Story Points

Description

In working on T406286: Introduce a subscribable "Updates" section to wishes, I realized for automatic updates, we're effectively doing the same thing that MediaWiki's built-in logging system does. So we might as well make use of it.

This would be great for monitoring meaningful changes to the Wishlist as a whole. All wish/FA creations, status changes, and focus area assignments will be viewable in one place.

In addition, the team has said we'd like to track how long it takes on average for wishes to go from "Under review" (when first created) to a traiged status. Having this data in the logging table would make it possible to query for this.

Acceptance criteria

  • See https://www.mediawiki.org/wiki/Help:Log for general information on logging
  • There should be a new log type at Special:Log called "Community Wishlist log" (short link Special:Log/communityrequests)
  • There should be five "action" types that get logged:
    • Wish creation
    • Wish status change
    • Wish focus area change
    • Focus area creation
    • Focus area status change
  • Links to wishes and focus areas in the log entry should include the entity title with the page title in parentheses

Derived Requirements

  1. The system must introduce a new MediaWiki log type named Community Wishlist log, accessible via Special:Log/communityrequests, and visible in the general Special:Log interface.
  2. The Community Wishlist log must record meaningful lifecycle events for wishlist entities to support monitoring and analytics across wishes and focus areas.
  3. The system must log the following five action types under the Community Wishlist log:
    • Wish creation
    • Wish status change
    • Wish focus area change
    • Focus area creation
    • Focus area status change
  4. Each log entry must include a link to the affected wish or focus area, displaying the entity title followed by the page title in parentheses.
  5. Logged data must be sufficient to support time-based analysis, including measuring the duration between wish creation (initial “Under review” status) and subsequent triaged status changes.
  6. Logging behavior must align with MediaWiki’s standard logging framework and conventions as documented in Help:Log.
Test Steps

Test Case 1: Community Wishlist Log Availability and Visibility

Preconditions

  • Tester has permission to view Special pages.
  1. Navigate to Special:Log.
  2. Review the list of available log types.
  3. Navigate directly to Special:Log/communityrequests.
  4. ✅❓❌⬜ AC1: Verify that a log type named Community Wishlist log is available in Special:Log and that Special:Log/communityrequests loads successfully and displays log entries (if any).

Test Case 2: Logging of Wish Creation and Initial Status

Preconditions

  • Tester has permission to create wishes.
  1. Create a new wish via the Community Wishlist interface.
  2. Note the initial status assigned at creation (e.g., “Under review”).
  3. Navigate to Special:Log/communityrequests.
  4. Locate the most recent log entry.
  5. ✅❓❌⬜ AC2: Verify that a log entry exists for Wish creation, includes a link to the wish, and displays the entity title with the page title in parentheses.

Test Case 3: Logging of Wish Status and Focus Area Changes

Preconditions

  • An existing wish is available.
  1. Change the status of the wish to another valid status.
  2. Assign the wish to a different focus area.
  3. Navigate to Special:Log/communityrequests.
  4. Identify the relevant log entries.
  5. ✅❓❌⬜ AC3: Verify that separate log entries are created for Wish status change and Wish focus area change, and that each entry correctly links to the wish with the required title format.

Test Case 4: Logging of Focus Area Creation and Status Changes

Preconditions

  • Tester has permission to manage focus areas.
  1. Create a new focus area.
  2. Change the status of the newly created focus area.
  3. Navigate to Special:Log/communityrequests.
  4. Locate the corresponding log entries.
  5. ✅❓❌⬜ AC4: Verify that log entries are created for Focus area creation and Focus area status change, each linking to the focus area with the entity title and page title in parentheses.

Test Case 5: Log Data Supports Time-to-Triage Analysis

Preconditions

  • At least one wish has progressed from “Under review” to a triaged status.
  1. Identify a wish with logged creation and subsequent status change entries.
  2. Review timestamps for the Wish creation and Wish status change log entries.
  3. Compare timestamps to ensure duration can be derived.
  4. ✅❓❌⬜ AC5: Verify that log entries contain accurate timestamps and action data sufficient to calculate the time elapsed between initial creation (“Under review”) and a triaged status change.

QA Results - Meta Beta

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1211242 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CommunityRequests@master] EntityChangesProcessor: service for comparing two entities

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

Change #1213124 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CommunityRequests@master] Add logging for entity creation, status changes and FA changes

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

MusikAnimal changed the task status from Open to In Progress.Dec 5 2025, 6:05 AM

Change #1211242 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] AbstractChangesProcessor: service for comparing two entities

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

Change #1213124 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Add logging for entity creation, status changes and FA changes

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

MusikAnimal changed the task status from In Progress to Open.Dec 22 2025, 5:10 PM

@MusikAnimal @dmaza @HMonroy Please review the five "action" types that get logged in the task description since they don't match in Meta Beta. Functionality was fine, but the wording is all different.

UPDATE: T410810#11516241

Test Result - Meta Beta

Status: ✅ PASS
Environment: Meta Beta
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://meta.wikimedia.beta.wmcloud.org/wiki/Special:Log

Test Steps

Test Case 1: Community Wishlist Log Availability and Visibility

Preconditions

  • Tester has permission to view Special pages.
  1. Navigate to Special:Log.
  2. Review the list of available log types.
  3. Navigate directly to Special:Log/communityrequests.
  4. AC1: Verify that a log type named Community Wishlist log is available in Special:Log and that Special:Log/communityrequests loads successfully and displays log entries (if any).

Test Case 2: Logging of Wish Creation and Initial Status

Preconditions

  • Tester has permission to create wishes.
  1. Create a new wish via the Community Wishlist interface.
  2. Note the initial status assigned at creation (e.g., “Under review”).
  3. Navigate to Special:Log/communityrequests.
  4. Locate the most recent log entry.
  5. AC2: Verify that a log entry exists for Wish creation, includes a link to the wish, and displays the entity title with the page title in parentheses.

Log was created but it did not "Wish creation"

Wish creation

Test Case 3: Logging of Wish Status and Focus Area Changes

Preconditions

  • An existing wish is available.
  1. Change the status of the wish to another valid status.
  2. Assign the wish to a different focus area.
  3. Navigate to Special:Log/communityrequests.
  4. Identify the relevant log entries.
  5. AC3: Verify that separate log entries are created for Wish status change and Wish focus area change, and that each entry correctly links to the wish with the required title format.

Does not have the wording of Wish status change and Wish focus area change as mentioned in the task description

2026-01-07_12-02-47.png (926×873 px, 181 KB)

Test Case 4: Logging of Focus Area Creation and Status Changes

Preconditions

  • Tester has permission to manage focus areas.
  1. Create a new focus area.
  2. Change the status of the newly created focus area.
  3. Navigate to Special:Log/communityrequests.
  4. Locate the corresponding log entries.
  5. AC4: Verify that log entries are created for Focus area creation and Focus area status change, each linking to the focus area with the entity title and page title in parentheses.

Same thing as the others, wording does not match task description

2026-01-07_11-52-28.png (998×882 px, 186 KB)

Test Case 5: Log Data Supports Time-to-Triage Analysis

Preconditions

  • At least one wish has progressed from “Under review” to a triaged status.
  1. Identify a wish with logged creation and subsequent status change entries.
  2. Review timestamps for the Wish creation and Wish status change log entries.
  3. Compare timestamps to ensure duration can be derived.
  4. AC5: Verify that log entries contain accurate timestamps and action data sufficient to calculate the time elapsed between initial creation (“Under review”) and a triaged status change.

Timestamp updates but wording does not match task description

GMikesell-WMF changed the task status from Open to In Progress.Jan 7 2026, 8:32 PM
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from QA to In Development on the Community-Tech (Sea Lion Squad) board.

I'll take over since MusikAnimal is on Sabbatical

@GMikesell-WMF As I'm going thru the Acceptance criteria, I don't see the wording issue you are mentioning on each of the failing tests. Wish creation, Wish status change, Wish focus area change, Focus area creation, Focus area status change are the actions in the drop-down for the Community Requests log-type, it is not a requirement for those exact words to be part of the log text as far as I can see. Am I missing something?

dmaza changed the task status from In Progress to Open.Tue, Jan 13, 5:19 PM
dmaza moved this task from In Development to QA on the Community-Tech (Sea Lion Squad) board.

No, I just wasn't sure until now. I wanted to confirm since I've seen it otherwise. I'll mark this as Resolved. Thanks for all your work!

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)