Filter doesn't keep pagination in bounds on Admin->Images
Bug #1372661 reported by
Doug Fish
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Discovered while testing out https:/
Navigate to Admin->
This behavior can be re-created outside of the code that was under review
Changed in horizon: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in horizon: | |
assignee: | Justin Pomeroy (jpomero) → nobody |
To post a comment you must log in.
Copy of my comment from the review the bug was discovered in: System- >Images,
The issue is intermittent and it only seems to happen to me on a fresh session. Steps I followed on master:
1) Sign out of horizon,
2) Sign into horizon,
3) Go to Admin->
4) Go to Page 2 of images table,
5) Apply the 'Image Name =' filter to match one of the images,
6) Notice that we are still on the second page,
7) Delete filter text box contents,
8) Re-click filter 9) We are redirected back to page 1
10) Go to page 2 again,
11) Re-apply same filter as before,
12) Redirect back to page 1 works correctly
I believe the cause is that when the post method on the DataTableView calls self.handle_ server_ filter( request) it returns False, so it never reaches the code that redirects back to Page 1. After some initial investigation the reason this returns False is that get_server_ filter_ info does not set the "changed" attribute of filter_info correctly, so it doesn't think that it requires the redirect. However if you follow my steps above, you'll see that after the initial filter is done and removed, that the code starts working as expected, leading me to believe it must have something to do with the comparison between whats stored in the session and the information in the POST query dict.