Page MenuHomePhabricator

Deleted Focus Area still appears as assigned in Wish instead of reverting to 'Unassigned'
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The Assigned focus are still says the FA# it was assigned even when it was deleted

What should have happened instead?:
It should go back to "Unassigned" if the focus area is deleted

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

2025-09-09_08-42-36.png (986×1 px, 150 KB)


Derived Requirement

When a Focus Area assigned to a Wish is deleted, the system should automatically update the Wish’s status to “Unassigned”.
The Wish should no longer display the deleted Focus Area reference (e.g., FA#) and should reflect its unassigned state both in the UI and database.

Test Steps

Test Case 1: Verify Wish reverts to 'Unassigned' when assigned Focus Area is deleted

  1. Create a new Wish or open an existing Wish with no assigned Focus Area.
  2. Assign a Focus Area (e.g., FA#4) to the Wish and submit the change.
  3. Navigate to the Focus Areas list and delete the Focus Area (FA#1) assigned to the Wish.
  4. Return to the Wish detail page (e.g., Community_Wishlist/Wishes/W13).
  5. ✅❓❌⬜ AC1: Confirm that the Wish now displays “Unassigned” in the Focus Area field instead of the deleted FA#.

Test Case 2: Verify database consistency after deletion

  1. After deleting the assigned Focus Area, query the backend or API (if available) for the Wish’s Focus Area assignment.
  2. ✅❓❌⬜ AC2: Confirm that the Focus Area reference is null, empty, or removed (not referencing the deleted Focus Area ID).

Test Case 3: Validate correct behavior when multiple Wishes share the same Focus Area

  1. Assign the same Focus Area (e.g., FA#6) to multiple Wishes.
  2. Delete FA#6.
  3. ✅❓❌⬜ AC3: Confirm that all Wishes previously linked to FA#2 revert to “Unassigned.”

QA Results - Meta Beta

ACStatusDetails
1T404101#11262742
2T404101#11262742
3T404101#11262742

Event Timeline

Samwilson subscribed.

This seems like it might be low priority at the moment, given that we don't often delete focus areas.

dmaza changed the task status from Open to In Progress.Sep 30 2025, 10:59 AM
dmaza claimed this task.

For now if the focus area is not found we will be displaying "Unassigned". I've updated T406059 description to include nullifying cr_focus_area when focus areas entities are deleted.

Change #1192892 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/CommunityRequests@master] Display Unassigned focus area when focus area is invalid

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

Change #1192892 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Display Unassigned focus area when focus area is invalid

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

@dmaza Confirmed deleted Focus Area still appears as assigned in Wish instead of reverting to 'Unassigned', as seen in the videos below. I will mark this as Resolved. Thanks for all your work!

Test Result - Beta|Prod

Status: ✅ PASS
Environment: beta/xyzwiki
OS: macOS Tahoe 26.0.1
Browser: Chrome 140
Device: MBA
Emulated Device: NA

Test Artifact(s):
https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/Wishes
https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/Focus_areas

Test Steps

Test Case 1: Verify Wish reverts to 'Unassigned' when assigned Focus Area is deleted

  1. Create a new Wish or open an existing Wish with no assigned Focus Area.
  2. Assign a Focus Area (e.g., FA#4) to the Wish and submit the change.
  3. Navigate to the Focus Areas list and delete the Focus Area (FA#1) assigned to the Wish.
  4. Return to the Wish detail page (e.g., Community_Wishlist/Wishes/W13).
  5. AC1: Confirm that the Wish now displays “Unassigned” in the Focus Area field instead of the deleted FA#.

Test Case 2: Verify database consistency after deletion

  1. After deleting the assigned Focus Area, query the backend or API (if available) for the Wish’s Focus Area assignment.
  2. AC2: Confirm that the Focus Area reference is null, empty, or removed (not referencing the deleted Focus Area ID).

Test Case 3: Validate correct behavior when multiple Wishes share the same Focus Area

  1. Assign the same Focus Area (e.g., FA#6) to multiple Wishes.
  2. Delete FA#6.
  3. AC3: Confirm that all Wishes previously linked to FA#2 revert to “Unassigned.”

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