Skip to content

FOUR-26363 | +Case Pagination Is Not Working Correctly#8896

Open
mcraeteisha wants to merge 3 commits into
developfrom
bugfix/FOUR-26363
Open

FOUR-26363 | +Case Pagination Is Not Working Correctly#8896
mcraeteisha wants to merge 3 commits into
developfrom
bugfix/FOUR-26363

Conversation

@mcraeteisha

@mcraeteisha mcraeteisha commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Issue

Ticket: FOUR-26363

This PR fixes the +Case modal per-page selector so that switching between 15 / 30 / 50 immediately refreshes the visible process list.

Solution

requestModal.vue inherits changePerPage() from datatableMixin, which reads this.data.meta.total to clamp the current page. But this component never assigns this.data; fetch() only writes the response into this.$refs.listProcess.data and this.processes. So this.data.meta was undefined, the shared handler threw before reaching this.fetch(), and the list never refreshed.

The solution was to override changePerPage(value) in resources/js/components/requests/requestModal.vue to read the total from this.$refs.listProcess.tablePagination (the same source onPageChange already uses), guard against the modal's lazily-mounted ref, clamp page, then call fetch(). Mirrors the pattern already used in CasesRetentionLogs.vue, with extra null-safety because this component lives inside a <b-modal> and doesn't fetch on created.

How To Test

  1. Login to ProcessMaker. Open +Case modal → verify list shows the default 15 per page.
  2. Change per-page selector to 30.
    - Ensure the list refreshes immediately, pagination shows "1 – 30 of N" (if 30+ processes exist).
  3. Change per-page selector to 50.
    • Ensure the list refreshes immediately and pagination reflects 50 (if 50+ processes exist).
  4. Change back to 15.
    • Esnure the list refreshes and pagination reflects 15.
  5. After each per-page change, use <, >, <<, >>, and direct page numbers to ensure paging still works.
  6. Type in the search box and ensure the filter still resets to page 1 and fetches correctly.
  7. Close and reopen the modal. Ensure the initial fetch works, per-page defaults to 15, all of the above still works.

ci:deploy

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

Add a new method to handle changing the number of items displayed per page. The method adjusts the current page number if necessary to ensure it doesn't exceed the total number of items, and triggers a data fetch with the updated pagination settings.
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@eiresendez eiresendez self-requested a review July 8, 2026 13:40
Comment thread resources/js/components/requests/requestModal.vue
Comment thread resources/js/components/requests/requestModal.vue Outdated
@mcraeteisha mcraeteisha requested a review from eiresendez July 10, 2026 21:24
@processmaker-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants