Page MenuHomePhabricator

Add 'close as duplicate' functionality to the Wishlist
Closed, ResolvedPublic5 Estimated Story PointsFeature

Assigned To
Authored By
MusikAnimal
Aug 11 2025, 9:22 PM
Referenced Files
F72487704: 2026-03-03_16-19-29.png
Mar 4 2026, 12:21 AM
F72478289: 2026-03-02_17-08-40.webm
Mar 3 2026, 1:13 AM
F72478231: 2026-03-02_17-02-44.png
Mar 3 2026, 1:13 AM
F72478230: 2026-03-02_17-03-12.png
Mar 3 2026, 1:13 AM
F72478210: 2026-03-02_15-14-44.mp4
Mar 3 2026, 1:13 AM
F72478207: 2026-03-02_15-13-44.mp4
Mar 3 2026, 1:13 AM
F72477383: 2026-03-02_15-11-47.mp4
Mar 3 2026, 1:13 AM
F72477343: 2026-03-02_15-07-08.mp4
Mar 3 2026, 1:13 AM

Description

We get a lot of duplicate wishes. The way we typically deal with them is to redirect the duplicate to the original, along with copying/pasting any relevant content.

Instead I think we should do it like Phabricator, where the old wish remains fully intact (not a redirect), but we just hide it from the list of wishes.

Acceptance criteria

  • Add a "Reason" dropdown when declining a wish that allows user to select "Duplicate"
  • When "Duplicate" is selected as the "Declined" reason , users will see a text field where they can enter the duplicate wish ID (ex. W123)
    • Wish selection can just be an input for the wish ID, until we have a better search in place
  • After submission, change to the "declined" status.
  • Insert template community wishlist decline wikitext in the wish's description (ex: {{Community Wishlist/Decline|duplicate|W456}} )
  • If the proposer of the duplicate wish has a vote, it should be transferred to the other wish
  • This doesn't include a way to merge descriptions of both wishes

Derived Requirement

Ensure that Wishlist moderators can close a wish as a duplicate without redirecting it.

  • A "Duplicate" option is available in the "Reason" dropdown when declining a wish.
  • When "Duplicate" is selected, a text field is displayed allowing entry of a duplicate wish ID (e.g., W123).
  • Upon submission:
    • The wish status changes to "Declined".
    • The {{Community Wishlist/Decline|duplicate|W###}} template is inserted into the wish description using the provided wish ID.
    • The declined duplicate wish remains accessible but is removed from the active wish list.
    • If the proposer of the duplicate wish has voted on it, their vote is transferred to the referenced original wish.
  • No automatic merging of descriptions occurs.
Test Steps

Preconditions:

  • User has moderator or appropriate permission to decline wishes.
  • Two wishes exist:
    • Original wish (e.g., W100).
    • Duplicate wish (e.g., W200).
  • The proposer of W200 has cast a vote on W200.

Test Case 1: Ensure "Duplicate" appears as a decline reason

  1. Navigate to a wish page eligible for decline.
  2. Initiate the decline workflow.
  3. Open the "Reason" dropdown.
  4. ✅❓❌⬜ AC1: The dropdown includes a "Duplicate" option.

Test Case 2: Ensure duplicate ID field appears when "Duplicate" is selected

  1. Select "Duplicate" from the "Reason" dropdown.
  2. Observe the decline form.
  3. ✅❓❌⬜ AC2: A text input field appears allowing entry of a duplicate wish ID (e.g., W100).

Test Case 3: Ensure wish status changes and template is inserted

  1. Enter a valid duplicate wish ID (e.g., W100).
  2. Submit the decline action.
  3. View the declined wish page in edit or wikitext mode.
  4. ✅❓❌⬜ AC3: The wish status is set to "Declined" and the template {{Community Wishlist/Decline|duplicate|W100}} is inserted into the wish description.

Test Case 4: Ensure duplicate wish is hidden from active list

  1. Navigate to the list of active/open wishes.
  2. Search for the declined duplicate wish.
  3. ✅❓❌⬜ AC4: The declined duplicate wish does not appear in the active wish list.

Test Case 5: Ensure proposer vote is transferred

  1. Before declining, record the vote count for both the original and duplicate wishes.
  2. Decline the duplicate wish as described above.
  3. Check the vote count of the original wish.
  4. ✅❓❌⬜ AC5: The proposer’s vote from the duplicate wish is removed from the duplicate and added to the original wish.

QA Results - Meta Beta

Event Timeline

Needs subtask to change ApiQueryWishes to accept a titleprex= parameter (or something) so that we can search for wishes by title.

This can later also be used to power the search on the wish index page, which is currently still an design experiment https://www.figma.com/design/JcTMFwbEJPpCKBiZ16Jkel/Future-of-the-Wishlist?node-id=3419-73841&p=f&t=oUL1TtdcCRBEBOmw-0

KSiebert set the point value for this task to 5.
HMonroy changed the subtype of this task from "Task" to "Feature Request".Oct 9 2025, 4:49 PM
MusikAnimal changed the task status from Open to In Progress.Oct 14 2025, 5:53 AM
MusikAnimal claimed this task.
MusikAnimal moved this task from v2 to Entities on the MediaWiki-extensions-CommunityRequests board.

I got stuck on the title search. I added a titlelike prop to ApiQueryWishes that essentially does a %search term% pattern search in SQL. I have a patch for that but I eventually realized we can fix things directly in CirrusSearch, and use that instead as it will do a better job overall. I'm exploring that as part of T406423.

Anyway, in the meantime, we could just have the input take the entity ID as opposed to the entity title.

Unlicking for now.

MusikAnimal changed the task status from In Progress to Open.Oct 31 2025, 8:59 PM
HMonroy changed the task status from Open to In Progress.Nov 3 2025, 9:12 PM
HMonroy claimed this task.
HMonroy changed the task status from Open to In Progress.Dec 5 2025, 6:48 PM
HMonroy claimed this task.

Change #1217341 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/extensions/CommunityRequests@master] Bug: T401638

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

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

[mediawiki/extensions/CommunityRequests@master] Use decline template when a wish needs to be marked as a duplicate

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

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

[integration/config@master] Zuul: [mediawiki/extensions/CommunityRequests] Add TemplateData dependency

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

Change #1243821 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/CommunityRequests] Add TemplateData dependency

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

Mentioned in SAL (#wikimedia-releng) [2026-02-25T14:07:22Z] <James_F> Zuul: [mediawiki/extensions/CommunityRequests] Add TemplateData dependency, for T401638

Change #1217341 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Use decline template when a wish needs to be marked as a duplicate

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

dmaza changed the task status from In Progress to Open.Feb 26 2026, 5:03 PM
dmaza moved this task from Feedback and Review to QA on the Community-Tech (Sea Lion Squad) board.

@HMonroy Please review AC2-AC5 below, thanks!

UPDATE: T401638#11670817

Test Result - Meta Beta

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

Test Artifact(s): Wish decline form, wish page wikitext, vote records, wish listing view

Test Steps

Preconditions:

  • User has moderator or appropriate permission to decline wishes.
  • Two wishes exist:
    • Original wish (e.g., W100).
    • Duplicate wish (e.g., W200).
  • The proposer of W200 has cast a vote on W200.

Test Case 1: Ensure "Duplicate" appears as a decline reason

  1. Navigate to a wish page eligible for decline.
  2. Initiate the decline workflow.
  3. Open the "Reason" dropdown.
  4. AC1: The dropdown includes a "Duplicate" option.

Test Case 2: Ensure duplicate ID field appears when "Duplicate" is selected

  1. Select "Duplicate" from the "Reason" dropdown.
  2. Observe the decline form.
  3. AC2: A text input field appears allowing entry of a duplicate wish ID (e.g., W43).

See AC1
A text input field for duplicate wish id does not appear , unless you are talking about the Additional Declined Parameter, which already appears regardless. If this is as design, shouldn't there be something as an example of goes straight to the the reason?

Test Case 3: Ensure wish status changes and template is inserted

  1. Enter a valid duplicate wish ID (e.g., W45).
  2. Submit the decline action.
  3. View the declined wish page in edit or wikitext mode.
  4. AC3: The wish status is set to "Declined" and the template {{Community Wishlist/Decline|duplicate|W45}} is inserted into the wish description.

I just want to validate is if this is what it's supposed to be when duplicate, field is empty and a wish that does not exist.

DuplicateEmptyWish that does not exist
}}

Test Case 4: Ensure duplicate wish is hidden from active list

  1. Navigate to the list of active/open wishes.
  2. Search for the declined duplicate wish.
  3. AC4: The declined duplicate wish does not appear in the active wish list.

If any of the 3 options in AC3, the wish should be active, correct?

In progressDuplicate
2026-03-02_17-03-12.png (1,132×1,082 px, 183 KB)
2026-03-02_17-02-44.png (1,319×1,125 px, 213 KB)

Test Case 5: Ensure proposer vote is transferred

  1. Before declining, record the vote count for both the original and duplicate wishes.
  2. Decline the duplicate wish as described above.
  3. Check the vote count of the original wish.
  4. ⬜  AC5: The proposer’s vote from the duplicate wish is removed from the duplicate and added to the original wish.

Vote did not transfer to the original one of W45

GMikesell-WMF changed the task status from Open to In Progress.Mar 2 2026, 4:36 PM
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.

@HMonroy Declined Reason does not work when you click on the drop-down box in Meta Beta or Local as seen in AC1.

Should be fixed now.

@HMonroy Please review AC2-AC5 below, thanks!

Test Result - Meta Beta/ Local

Status: ✅ PASS / ❓ Need More Info / ❌ FAIL
Environment: Meta Beta/ Local
OS: macOS Tahoe 26.3
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s): Wish decline form, wish page wikitext, vote records, wish listing view

Test Steps

Preconditions:

  • User has moderator or appropriate permission to decline wishes.
  • Two wishes exist:
    • Original wish (e.g., W100).
    • Duplicate wish (e.g., W200).
  • The proposer of W200 has cast a vote on W200.

Test Case 1: Ensure "Duplicate" appears as a decline reason

  1. Navigate to a wish page eligible for decline.
  2. Initiate the decline workflow.
  3. Open the "Reason" dropdown.
  4. AC1: The dropdown includes a "Duplicate" option.

Test Case 2: Ensure duplicate ID field appears when "Duplicate" is selected

  1. Select "Duplicate" from the "Reason" dropdown.
  2. Observe the decline form.
  3. AC2: A text input field appears allowing entry of a duplicate wish ID (e.g., W43).

See AC1
A text input field for duplicate wish id does not appear , unless you are talking about the Additional Declined Parameter, which already appears regardless. If this is as design, shouldn't there be something as an example of goes straight to the the reason?

The Additional Declined Parameter is the field for the wish ID. We made it generic since other declined reason options, like strategy, might also need additional information.

Test Case 3: Ensure wish status changes and template is inserted

  1. Enter a valid duplicate wish ID (e.g., W45).
  2. Submit the decline action.
  3. View the declined wish page in edit or wikitext mode.
  4. AC3: The wish status is set to "Declined" and the template {{Community Wishlist/Decline|duplicate|W45}} is inserted into the wish description.

Yup, this is expected we are not validated that there's a wish entered when the duplicate reason is selected.

I just want to validate is if this is what it's supposed to be when duplicate, field is empty and a wish that does not exist.

DuplicateEmptyWish that does not exist
}}

Test Case 4: Ensure duplicate wish is hidden from active list

  1. Navigate to the list of active/open wishes.
  2. Search for the declined duplicate wish.
  3. AC4: The declined duplicate wish does not appear in the active wish list.

If any of the 3 options in AC3, the wish should be active, correct?

In progressDuplicate
2026-03-02_17-03-12.png (1,132×1,082 px, 183 KB)
2026-03-02_17-02-44.png (1,319×1,125 px, 213 KB)

Declined wishes are not displayed by the wishlist parser funciont unless we filter by declined.

{{#CommunityRequests:wish-index |statuses=declined|limit=50}}

We setup a page for declined wishes in meta: https://meta.wikimedia.org/wiki/Community_Wishlist/Archive

Test Case 5: Ensure proposer vote is transferred

  1. Before declining, record the vote count for both the original and duplicate wishes.
  2. Decline the duplicate wish as described above.
  3. Check the vote count of the original wish.
  4. AC5: The proposer’s vote from the duplicate wish is removed from the duplicate and added to the original wish.

Vote did not transfer to the original one of W45

We didn't implement this part. I submitted a new task to cover the votes T418937

HMonroy changed the task status from In Progress to Open.Mar 3 2026, 9:37 PM
HMonroy moved this task from In Development to QA on the Community-Tech (Sea Lion Squad) board.

@HMonroy Ok that covers it up, along with the task you created. Also, I created https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/Archive, as seen below, so Meta Beta has it too. I will mark this as Resolved, thanks for all your work!

2026-03-03_16-19-29.png (1,091×1,108 px, 201 KB)

GMikesell-WMF updated the task description. (Show Details)