Skip to content

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

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

FOUR-26363 | +Case Pagination Is Not Working Correctly#8896
mcraeteisha wants to merge 4 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

@eiresendez eiresendez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 Working as expected!

@gitguardian

gitguardian Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34069781 Triggered Generic Password 4d6f281 resources/views/auth/passwords/reset.blade.php View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@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

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://ci-91e619443e.engk8s.processmaker.net

@mcraeteisha

Copy link
Copy Markdown
Contributor Author

Please note that the security check failure by GitGuardian comes from reset.blade.php which is unrelated to the code changes in this PR.

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.

4 participants