Skip to content

DURACOM-416 Created fallback logic when user reaches an out of bound page number - #5049

Merged
nwoodward merged 3 commits into
DSpace:mainfrom
4Science:task/main/DURACOM-416
Oct 29, 2026
Merged

nwoodward merged 3 commits into
DSpace:mainfrom
4Science:task/main/DURACOM-416

Conversation

@Sondissimo

@Sondissimo Sondissimo commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

Added in the paginator a fallback logic to prevent the case where the user reaches an out of bound page and nothing is shown

Instructions for Reviewers

Created methods that handles the fallback logic to prevent the user reaching an out of bound page

To test, in the processes page, visit the last page of section “Scheduled Processes”.

Then, delete the processes displayed on that page.

It previously remained stuck on an empty “Scheduled Processes” page, now we fallback to the page with the highest number

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge tools:processes Related to Scripts & Processes (new to DSpace 7) labels Jan 28, 2026
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Jan 28, 2026
@tdonohue tdonohue added the port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release label Jan 28, 2026
@kanasznagyzoltan

Copy link
Copy Markdown
Contributor

We have tested, as we see: works as intended. Deleted all processes from the last page, when deletion finished it navigates back to the previous page.

pr_5049_test.mp4

@lgeggleston lgeggleston moved this to 👍 Reviewer Approved in DSpace 11.0 Release Jun 2, 2026
@lgeggleston lgeggleston added the port to dspace-10_x This PR needs to be ported to `dspace-10_x` branch for next bug-fix release label Jun 2, 2026
@kanasznagyzoltan

Copy link
Copy Markdown
Contributor

@Sondissimo following up on this one. I tested it at the end of April and the fallback worked — emptying the last page navigated back to a valid page.

It's been carrying the 1 APPROVAL label since then and is labelled for backport to 9_x/10_x. Is anything still blocking the final Committer check? Happy to re-test on current main.

@nwoodward

Copy link
Copy Markdown
Contributor

Hi @Sondissimo. Thanks for this PR. Is it still required after #5485 was merged? I'm trying to understand if they fix separate issues.

@Sondissimo

Copy link
Copy Markdown
Contributor Author

Yes, the two PRs fix different issues. This one concerns the processes page, while PR #5485 addressed the search page

@nwoodward
nwoodward self-requested a review October 26, 2026 13:21
@nwoodward nwoodward closed this Oct 26, 2026
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 11.0 Release Oct 26, 2026
@nwoodward nwoodward reopened this Oct 26, 2026
@nwoodward

Copy link
Copy Markdown
Contributor

@Sondissimo OK, thanks for the clarification. It's failing tests now, but if you can fix those I'll review and get it merged.

@tdonohue tdonohue moved this from ✅ Done to 👀 Under Review in DSpace 11.0 Release Oct 26, 2026

@nwoodward nwoodward 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.

Thanks @Sondissimo. I tested this today, and it works as expected - deleting the processes on the final page moves the user to the penultimate page. Now we just need to improve the code coverage.

@github-project-automation github-project-automation Bot moved this from 👀 Under Review to 👍 Reviewer Approved in DSpace 11.0 Release Oct 28, 2026
@nwoodward nwoodward added the port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release label Oct 29, 2026
@nwoodward
nwoodward merged commit dd495bb into DSpace:main Oct 29, 2026
18 of 19 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 11.0 Release Oct 29, 2026
@dspace-bot

Copy link
Copy Markdown
Contributor

@dspace-bot

Copy link
Copy Markdown
Contributor

@dspace-bot

Copy link
Copy Markdown
Contributor

@nwoodward nwoodward added this to the 11.0 milestone Oct 29, 2026
nwoodward pushed a commit that referenced this pull request Oct 29, 2026
…page number (#5049) (#6468)

* DURACOM-416 Created fallback logic when user reaches an out of bound page number

* [DURACOM-416] tests fix

---------


(cherry picked from commit dd495bb)

Co-authored-by: Mattia Vianelli <119754561+Sondissimo@users.noreply.github.com>
Co-authored-by: Mattia Vianelli <Mattia.Vianelli@4Science.com>
nwoodward pushed a commit that referenced this pull request Oct 29, 2026
…page number (#5049) (#6467)

* DURACOM-416 Created fallback logic when user reaches an out of bound page number

* [DURACOM-416] tests fix

---------


(cherry picked from commit dd495bb)

Co-authored-by: Mattia Vianelli <119754561+Sondissimo@users.noreply.github.com>
Co-authored-by: Mattia Vianelli <Mattia.Vianelli@4Science.com>
nwoodward pushed a commit that referenced this pull request Oct 29, 2026
…page number (#5049) (#6466)

* DURACOM-416 Created fallback logic when user reaches an out of bound page number

* [DURACOM-416] tests fix

---------


(cherry picked from commit dd495bb)

Co-authored-by: Mattia Vianelli <119754561+Sondissimo@users.noreply.github.com>
Co-authored-by: Mattia Vianelli <Mattia.Vianelli@4Science.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release port to dspace-10_x This PR needs to be ported to `dspace-10_x` branch for next bug-fix release tools:processes Related to Scripts & Processes (new to DSpace 7)

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

6 participants