| Summary: | Filters not working as designed | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Belen Barros Pena <belen.barros.pena> |
| Component: | toaster | Assignee: | David Reyna <david.reyna> |
| Status: | VERIFIED FIXED | QA Contact: | Mihail Stanciu <stanciux.mihail> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | alexandru.c.georgescu, alexandru.damian, belen.barros.pena, bluelightning, cristiana.voicu, david.reyna, jessica.zhang |
| Version: | unspecified | ||
| Target Milestone: | 1.8 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Belen Barros Pena
2015-03-16 13:46:46 UTC
I also encountered this issue.
I observed that 'total_count' always uses “queryset_with_search.count()”, but that is wrong since that query also include any filtering. The observed error is that the “all” count in the filter popup will show the current limited filtered/searched count and not the full count, and that just looks wrong.
I fixed it in the two all builds tables (via 6040, under review), but I have not touched the other view classes yet. Here is my fix:
- 'total_count' : queryset_with_search.count(),
+ 'total_count' : queryset_all.count(),
I've had a look at the filters behaviour and at the counter information. The funniest thing is that the filters are behaving as per the design specs. But the counters show the wrong information, and that totally throws you off. The easy way of solving the problem is removing the counters. Removing the counters from the filters also removes our mechanism to stop users from selecting filter options that return zero entries. We should have a state in place for that case (built as part of the empty states specification), but we need to make sure we test this case. Belen's proposal was adopted. Verified on master: 8b3d3e7c957ad06c390886487f69aeb8e145da6a |