Closed Bug 1782670 Opened 3 years ago Closed 3 years ago

In advanced search, some components are visible in the list when they shouldn't

Categories

(bugzilla.mozilla.org :: User Interface, defect)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: calixte, Assigned: dkl)

Details

Attachments

(1 file)

STR:

These components belong to Plugins Graveyard and by default Graveyard is not selected in the classification list.
If I select myself all the items in the classification list except the Graveyard then the 2 PDF components are not in the component list.

Assignee: ui → nobody
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa

(In reply to Calixte Denizet (:calixte) from comment #0)

STR:

These components belong to Plugins Graveyard and by default Graveyard is not selected in the classification list.
If I select myself all the items in the classification list except the Graveyard then the 2 PDF components are not in the component list.

Just to clarify, are any classifications select when you are seeing the additional components? If no classifications are selected, and no products are selected, then all components will be in the component list even if they are graveyarded. Everyone's initial view of query.cgi?format=advanced can be different so trying to reproduce on my end won't mean much.

Thanks

Flags: needinfo?(cdenizet)
Attached image image.png

Here's exactly what I see when I open the advanced search.
So visually, everything is selected but Graveyard.

Flags: needinfo?(cdenizet)

At a glance this part of selectProduct() appears to be problematic:

    // If this is the first load and nothing is selected, no need to
    // merge and sort all lists; they are created sorted.
    if ((first_load) && (product.selectedIndex == -1)) {
        first_load = false;
        return;
    }

On first load there isn't a product selected, so it exits early and doesn't filter the components list based on the selected classifications.
Any changes to the selected classifications after the page has loaded results in the correct behaviour.

(In reply to :glob ✱ from comment #3)

At a glance this part of selectProduct() appears to be problematic:

    // If this is the first load and nothing is selected, no need to
    // merge and sort all lists; they are created sorted.
    if ((first_load) && (product.selectedIndex == -1)) {
        first_load = false;
        return;
    }

On first load there isn't a product selected, so it exits early and doesn't filter the components list based on the selected classifications.
Any changes to the selected classifications after the page has loaded results in the correct behaviour.

Yeah noticed that myself just now whilst playing around with selecting/unselecting. Will take a look today.

Assignee: nobody → dkl
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: