Closed Bug 1339893 Opened 8 years ago Closed 7 years ago

drop down filter persistance shows empty page if no Rules exist for the saved product/channel combination

Categories

(Release Engineering Graveyard :: Applications: Balrog (frontend), defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: kingobiorahh, Mentored)

References

Details

(Whiteboard: [lang=js][good first bug][ready])

This is an extreme edge case (we rarely drop a product or channel), but I happened to notice in my local development environment that the drop down filter had nothing selected when I loaded the Rules page this morning.

Probably we just need to check that the saved value is still valid before setting the selected value.
Let me give it a shot.
Okay. you can have it.
Mentor: bhearsum
Assignee: nobody → obinna.okwuolisa
I(In reply to Ben Hearsum (:bhearsum) from comment #0)
> This is an extreme edge case (we rarely drop a product or channel), but I
> happened to notice in my local development environment that the drop down
> filter had nothing selected when I loaded the Rules page this morning.
> 
> Probably we just need to check that the saved value is still valid before
> setting the selected value.

Hello, Ben. I can't replicate the bug on my local development environment. Can please give more details about the bug?
Flags: needinfo?(bhearsum)
(In reply to Obinna Okwuolisa from comment #4)
> I(In reply to Ben Hearsum (:bhearsum) from comment #0)
> > This is an extreme edge case (we rarely drop a product or channel), but I
> > happened to notice in my local development environment that the drop down
> > filter had nothing selected when I loaded the Rules page this morning.
> > 
> > Probably we just need to check that the saved value is still valid before
> > setting the selected value.
> 
> Hello, Ben. I can't replicate the bug on my local development environment.
> Can please give more details about the bug?

Sure. Try this:
1) Start the development environment
2) Browse to http://localhost:8080/rules and change the Product/Channel filter to "Firefox,bad-rail".
3) Delete the first rule in the list.
4) Reload the page

You should see that the Product/Channel filter has nothing selected, and that only one Rule is present on the page. The expected result here is that if the cached filter doesn't match one of the options, "All rules" is used as the filter instead, which will show a lot more Rules.

Does that make sense?
Flags: needinfo?(bhearsum)
(In reply to Ben Hearsum (:bhearsum) from comment #5)
> (In reply to Obinna Okwuolisa from comment #4)
> > I(In reply to Ben Hearsum (:bhearsum) from comment #0)
> > > This is an extreme edge case (we rarely drop a product or channel), but I
> > > happened to notice in my local development environment that the drop down
> > > filter had nothing selected when I loaded the Rules page this morning.
> > > 
> > > Probably we just need to check that the saved value is still valid before
> > > setting the selected value.
> > 
> > Hello, Ben. I can't replicate the bug on my local development environment.
> > Can please give more details about the bug?
> 
> Sure. Try this:
> 1) Start the development environment
> 2) Browse to http://localhost:8080/rules and change the Product/Channel
> filter to "Firefox,bad-rail".
> 3) Delete the first rule in the list.
> 4) Reload the page
> 
> You should see that the Product/Channel filter has nothing selected, and
> that only one Rule is present on the page. The expected result here is that
> if the cached filter doesn't match one of the options, "All rules" is used
> as the filter instead, which will show a lot more Rules.
> 
> Does that make sense?

Yes it does. I'll look at it
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/d869d9a893bc69a1492b41273f9d3da75f57d15a
Bug 1339893: show "All rules" if no value is selected on the product/channel filter (#391). r=bhearsum
Depends on: 1399179
This is in production, nice work Obinna!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.