Skip to content

Fix pagination on the "Select bitstreams" modal of the "Access Control" tab#4143

Merged
tdonohue merged 2 commits intoDSpace:mainfrom
atmire:w2p-130081_access-control-bitstreams-pagination-fix-main
Apr 11, 2025
Merged

Fix pagination on the "Select bitstreams" modal of the "Access Control" tab#4143
tdonohue merged 2 commits intoDSpace:mainfrom
atmire:w2p-130081_access-control-bitstreams-pagination-fix-main

Conversation

@nona-luypaert
Copy link
Contributor

References

Description

Fixed pagination on the "Select bitstreams" modal of the "Edit Item > Access Control" page.

Instructions for Reviewers

Changes

Refactored ItemAccessControlSelectBitstreamsModalComponent to:

  • Simplify how the bitstreams are retrieved.
  • Ensure the correct PaginationComponentOptions are being used.

Include guidance for how to test or review your PR.

  • Upload a lot of bitstreams to the ORIGINAL bundle of an item (at least 6)
  • Go the /edit/access-control page of that item.
  • In the right column, switch "Bitstreams", select "0 bitstreams selected", click the looking glass icon.
  • Verify:
    • Only the first 5 bitstreams are displayed.
    • The pagination header is correct ("Now showing 1 - 5 of X").
    • You can use the pagination buttons to show a different set of bitstreams.
    • You can still select/deselect bitstreams to apply access conditions on.

Checklist

  • 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.

…-bitstreams-pagination-fix-7.6' into w2p-130081_access-control-bitstreams-pagination-fix-main

 Conflicts:
	src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.html
	src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts
@nona-luypaert nona-luypaert added bug component: Item (Archived) Item display or editing claimed: Atmire Atmire team is working on this issue & will contribute back port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Apr 9, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 9.0 Release Apr 9, 2025
@tdonohue tdonohue self-requested a review April 10, 2025 14:31
@tdonohue tdonohue moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 9.0 Release Apr 10, 2025
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @nona-luypaert ! Tested this today and it fixes the bug. This PR will need to be manually backported to 7.x and 8.x because the code syntax of this PR would be different in those older versions.

Could you create a 7.x and 8.x version of this PR in order to backport it?

@github-project-automation github-project-automation bot moved this from 👀 Under Review to 👍 Reviewer Approved in DSpace 9.0 Release Apr 11, 2025
@tdonohue tdonohue merged commit 46831cb into DSpace:main Apr 11, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 9.0 Release Apr 11, 2025
@tdonohue tdonohue added this to the 9.0 milestone Apr 11, 2025
@dspace-bot
Copy link
Contributor

@dspace-bot
Copy link
Contributor

Backport failed for dspace-8_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-8_x
git worktree add -d .worktree/backport-4143-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-4143-to-dspace-8_x
git switch --create backport-4143-to-dspace-8_x
git cherry-pick -x c03bbb01a2d4ebdedacff3b046a7ce0522bf971f

@artlowel artlowel removed port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Item (Archived) Item display or editing

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Broken pagination on the "Select bitstreams" modal of the "Access Control" tab

4 participants