Page MenuHomePhabricator

Search shouldn't search in "Wage?" and "Paid?" fields on individual ticket pages
Open, LowPublic

Description

Problem

If you search for "Yes" at any ticket page, you might well get all the expenses, in case all are paid, for instance. However, you're interested in an expense which contains "yes" as its description.

Proposed solution

Exclude "Wage" and "Paid" fields from search fields on individual ticket pages.

Student is expected to send a patch for wikimedia-cz/tracker repository, hosted at Wikimedia Gerrit. When claiming task on GCI website, student should claim a respective Phabricator task as well.

Materials

Event Timeline

Urbanecm updated the task description. (Show Details)
Urbanecm moved this task from Bugs to GCI on the WMCZ-Tracker board.

Hi! I'm Usama Walayat, a GSoC 2026 applicant for the Wikifile-Transfer project. I'd like to claim this task. Here's my deep analysis and proposed solution:
Problem:
The WMCZ Tracker (a Django-based expense and document tracking tool for Wikimedia CZ) has a global search feature. Currently when users search for anything, the search query also scans through boolean/checkbox fields like "Wage?" and "Paid?". This makes no sense — these are Yes/No fields and searching them with text produces irrelevant or misleading results, polluting the search output with unintended matches.
Root Cause:
In the Django Tracker codebase, the search view likely uses a broad Q() query that includes ALL model fields via icontains — including boolean fields like is_wage and is_paid. Django does not raise an error when you apply icontains to a BooleanField but it produces meaningless results.
My Proposed Solution:

Locate the search view in the Tracker codebase (likely in views.py or search_indexes.py)
Identify the Q() query object that builds the search filter
Explicitly exclude boolean fields (wage, paid) from the search query by removing them from the Q() chain
Ensure only text-based fields like title, description, author, document_number remain in the search
Add a test case verifying that searching "True" or "False" does not return results based on the Wage/Paid fields

I have Python and Django experience including writing search views with Q() objects. May I claim this task?