dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Fixed pagination issues on item mapper

Open alexandrevryghem opened this issue 1 year ago • 1 comments

References

  • Fixes #2613

Description

Fixed the Item Mapper not paginating the items correctly. Because the page config was improperly configured the request to the backend did not include the page size & the cuurrent page. This lead to all items being displayed in the Item Mapper & the different pages always displaying the same result.

Instructions for Reviewers

List of changes in this

  • Ensured the pagination options were correctly passed to the backend in CollectionItemMapperComponent.

Guidance for how to test or review this PR:

  • Add a total of 11 items to a certain collection
  • Create a new collection and go to Edit Collection > Item Mapper
  • Map those 11 items to this new collection and check that the pagination in Browse mapped items is fixed

Checklist

  • [x] 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.
  • [x] My PR passes ESLint validation using yarn lint
  • [x] My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • [x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • [x] 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.
  • [x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • [x] If my PR fixes an issue ticket, I've linked them together.

alexandrevryghem avatar Nov 15 '23 22:11 alexandrevryghem

Hi @alexandrevryghem, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!

github-actions[bot] avatar Mar 08 '24 15:03 github-actions[bot]

My colleague (Sutya Miklós (QULTO)) has tested it yesterday: For him it did not work properly on his local installation:

  1. Logged in as admin user. Clicked on Edit → Collection. Selected a collection.
  2. Clicked on Item Mapper → Map New Items
  3. Entered “***” as Search query.
  4. The results come up, but the whole page freezes and does not respond.
  5. This happened in locally run DSpace and on sandbox.dspace.org as well

kanasznagyzoltan avatar Apr 18 '24 11:04 kanasznagyzoltan

@kanasznagyzoltan: This is another issue see #2953 but I already created a fix for this and was planning to contribute it to this PR later today

alexandrevryghem avatar Apr 18 '24 11:04 alexandrevryghem

@kanasznagyzoltan: This is another issue see #2953 but I already created a fix for this and was planning to contribute it to this PR later today

Thank you for the info!

kanasznagyzoltan avatar Apr 18 '24 12:04 kanasznagyzoltan

Hi @alexandrevryghem, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!

github-actions[bot] avatar Apr 18 '24 19:04 github-actions[bot]

I tested it in a local environment and it works perfectly. Thanks @alexandrevryghem !

Leano1998 avatar Apr 19 '24 09:04 Leano1998

I've realized the original bug ticket (#2613) was for 7.6.x, so we may need to find a way to port this to 7.6.x if possible. Adding the port to dspace-7_x label.

tdonohue avatar Apr 19 '24 15:04 tdonohue

Backport failed for dspace-7_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-7_x
git worktree add -d .worktree/backport-2642-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-2642-to-dspace-7_x
git switch --create backport-2642-to-dspace-7_x
git cherry-pick -x 45e8977db7d34d7b0684c16f92e9e917f6ac4579 da31c4f253ecc504e65ebc3ebe18b4ce2a0960a2 59197cff2d663240cb771d58d1f01cf97d78c3b4 268d2e54fcb0c35216669e52022564a9c5a651d1

dspace-bot avatar Apr 19 '24 15:04 dspace-bot

It appears this will require a manual port to 7.x as the automated port failed ☝️

tdonohue avatar Apr 19 '24 15:04 tdonohue