Page MenuHomePhabricator

Add a filter to view wishes with no focus area
Closed, ResolvedPublic

Description

This was brought up by @JSengupta-WMF.

It would be useful to be able to query for wishes that have no assigned focus area.

Developer notes

  • ApiQueryWishes should accept unassigned as a value for the focusarea parameter
  • Perhaps a new constant WishStore::FILTER_NO_FOCUS_AREA
  • Query for static::focusAreaField() => null

Acceptance criteria

When querying action=communityrequests-wishes with focusarea=unassigned, only wishes with no focus area should be returned.


Derived Requirement

Add support for filtering wishes with no assigned focus area in the API and UI:

  • Extend ApiQueryWishes to accept focusarea=unassigned.
  • Implement WishStore::FILTER_NO_FOCUS_AREA constant for handling this filter.
  • Update query logic so that focusarea=unassigned returns only wishes where focusAreaField() => null.
  • Ensure no other wishes (with assigned focus areas) are included in the result.
Test Steps

Test Case 1: Query with Focus Area = Unassigned

  1. Open the API Sandbox on beta.
  2. Run the query:

    ` action=query list=communityrequests-wishes crwfocusareas=unassigned format=json `
  3. ✅❓❌⬜ AC1: The result returns only wishes without a focus area assigned.

QA Results - Meta Beta

ACStatusDetails
1T405049#11233960

Event Timeline

Change #1190633 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/CommunityRequests@master] Add 'unassigned' as a crwfocusareas value for the wishes API

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

MusikAnimal changed the task status from Open to In Progress.Sep 24 2025, 9:11 PM

Change #1190633 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Add 'unassigned' as a crwfocusareas value for the wishes API

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

Samwilson changed the task status from In Progress to Open.Sep 29 2025, 8:27 AM

@Samwilson Confirmed the result returns only wishes without a focus area assigned, as seen in the gif/screenshots below. I will mark this as Resolved. Thanks for all your work!

Test Result - Meta Beta

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

Test Artifact(s):

https://meta.wikimedia.beta.wmcloud.org/wiki/Special:ApiSandbox#action=query&format=json&list=communityrequests-wishes&formatversion=2&crwfocusareas=unassigned

Test Steps

Test Case 1: Query with Focus Area = Unassigned

  1. Open the API Sandbox on beta.
  2. Run the query: action=query list=communityrequests-wishes crwfocusareas=unassigned format=json
  3. AC1: The result returns only wishes without a focus area assigned.
QuereyResults_1Results_2
2025-10-01_09-05-37.mp4.gif (974×1,048 px, 3 MB)
2025-10-01_09-05-55.png (1,242×1,040 px, 229 KB)
2025-10-01_09-06-23.png (819×1,024 px, 159 KB)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)