Filter doesn't keep pagination in bounds on Admin->Images

Bug #1372661 reported by Doug Fish
20
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://review.openstack.org/#/c/121529/

 Navigate to Admin->System->Images (I have 6 images in my list) click Next to go to the 2nd page use the filter [Image Name =] to match an image from the first page I remain on the 2nd page on an empty page with a Prev link. Even after I click Prev and see the image I can still click Next and see the 0 item 2nd page.

This behavior can be re-created outside of the code that was under review

Revision history for this message
Sam Betts (sambetts) wrote :

Copy of my comment from the review the bug was discovered in:
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->System->Images,
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.

Doug Fish (drfish)
Changed in horizon:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Justin Pomeroy (jpomero) wrote :

I think this is the issue where the filter "changed" variable needs to be loosened up.

Changed in horizon:
assignee: nobody → Justin Pomeroy (jpomero)
Revision history for this message
Justin Pomeroy (jpomero) wrote :

We might want to wait and see what the outcome of bug 1369014 is, since it might end up also fixing this problem.

https://bugs.launchpad.net/horizon/+bug/1369014

Justin Pomeroy (jpomero)
Changed in horizon:
assignee: Justin Pomeroy (jpomero) → nobody
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Just verified it on a master/mitaka branch, the issue disappeared. I believe that it was indeed caused by bug 1369014. Closing this one.

Changed in horizon:
status: Triaged → 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.