IProjectSet.search() has unused untested optional arguments

Bug #60055 reported by James Henstridge
12
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
j.c.sackett

Bug Description

Both IProductSet.search() and IProjectSet.search() include optional arguments to constrain the search to products (resp. projects) that use rosetta, malone, bazaar, etc.

These arguments can be used via the productset and projectset views by URL hacking. For example:
    https://launchpad.net/products?text=gnome&bazaar=1

However there is nothing in the page templates that would let a user do this (I think they used to be visible a long time ago). One of the following should be done:

 * expose the checkboxes in the page templates, and add tests
 * remove support for these constraints from the view classes and database classes
 * remove support for these constraints from the view classes, but leave them in the DB classes and add tests.

Related branches

Changed in launchpad:
importance: Untriaged → Low
status: Unconfirmed → Confirmed
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

For IProductSet, those arguments are also completely untested.

The entire test suite calls the method only in one place (bugtask-adding-pages.txt, from bugalsoaffects.py) and only the first parameter is used. Breaking that method only breaks that test, and all tests pass if the method is made to break whenever any of the other arguments is given.

Also, the rosetta argument produces invalid SQL: see bug 1415.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Confirmed → Triaged
Revision history for this message
Barry Warsaw (barry) wrote :

Assigning to me. Time box to 2 hours for now.

Changed in launchpad-registry:
milestone: none → 2.2.8
assignee: nobody → Barry Warsaw (barry)
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 2.2.8 → none
assignee: Barry Warsaw (barry) → nobody
Revision history for this message
Curtis Hovey (sinzui) wrote :

I want to remove the arguments. I do not think they are used. I doubt we will give 3 years has passed.

Changed in launchpad-registry:
milestone: none → 3.1.10
tags: added: infrastructure post-3-ui-cleanup
removed: registry ui
Curtis Hovey (sinzui)
tags: added: tech-debt
removed: infrastructure
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 3.1.10 → none
Curtis Hovey (sinzui)
tags: removed: post-3-ui-cleanup
Revision history for this message
Curtis Hovey (sinzui) wrote :

Remove the arguments.

tags: added: trivial
Revision history for this message
j.c.sackett (jcsackett) wrote :

The PersonSet.search() method is gone, and there doesn't appear to be a method on PersonSet that has those parameters any longer.

summary: - IProductSet.search() and IProjectSet.search() have unused untested
- optional arguments
+ IProjectSet.search() has unused untested optional arguments
j.c.sackett (jcsackett)
Changed in launchpad-registry:
status: Triaged → In Progress
assignee: nobody → j.c.sackett (jcsackett)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in launchpad-registry:
milestone: none → 10.12
tags: added: qa-needstesting
Changed in launchpad-registry:
status: In Progress → Fix Committed
j.c.sackett (jcsackett)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.