department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
99 stars 69 forks source link

Pagination on Facility Status View #8743

Open swirtSJW opened 2 years ago

swirtSJW commented 2 years ago

Describe the defect

The paginator on the facility status view does not reflect the filtered number of results.

This View is only used by a few people so this is not a priority.

To Reproduce

Steps to reproduce the behavior:

  1. Log In as admin or content admin
  2. Go to "Content" -> "Facilities" and -> "Facility Status" /admin/content/facilities/facility-status
  3. Select "VBA" as the Section and "Locator ID" as vba_314 and filter the results
  4. Notice that there are only 17 results, but for some reason at the bottom we have crazy pagination available. When I click on another page there's no way for me to get back other than the back button.

Expected behavior

Pagination should only appear if there are more than one pages of results, and the number of pagination buttons should match the actual number of pages.

Screenshots

Additional context

I (swirt) did some poiking at it. This and it is not tied to any of the filters. It corresponds directly to the presence of the bulk operation. Removing the bulk operation field resolves the problem. image However this bulk operation is the entire point of the View so it can not be removed.

As of today 4/13/22 there are no related issues in the VBO issue queue for pager, pagination, or pages. This is not happening on our other Bulk edit View (uses bulk action) so I am not certain this is an upstream issue. The facility status View uses Bulk "edit" rather than "action". It needs a bit more investigation.

There is also a red herring in the View of a relationship that is not needed. I believe it spilled over from another View. image

Desktop (please complete the following information if relevant, or delete)

Labels

(You can delete this section once it's complete)

CMS Team

Please check the team(s) that will do this work.

chri5tia commented 2 years ago

When I have access and finished onboarding, I can tackle this. What are the view's settings for the number of results to show and pagination? We may need to look at the query info under advanced as well. Do we have a module in place on non-prod (such as the devel module) that exposes the view query on the page for quick/easy MySQL query visual debugging? I've implemented different VBO features before and will probably be able to remember how I dealt with this issue in the past. It's likely a view config.