Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Bitstreams on edit-item-page doesn't work #3121

Conversation

alexandrevryghem
Copy link
Member

@alexandrevryghem alexandrevryghem commented Jun 14, 2024

References

Description

Fixed the issue on the edit bitstream tab from the item page, and also fixed the same kind of performance issues on the Content Source tab from edit collection.

Instructions for Reviewers

List of changes in this PR:

  • Fixed the issue on the edit bitstream tab. This issue has been fixed by replacing the observableZip with an observableCombineLatest because when you have multiple bundles, the this.objectUpdatesService.hasUpdates won't emit for all the bundles causing the observableZip not to emit and update it's value. By changing it to an observableCombineLatest even when one bundle has been changed the whole observable will update.
  • The same type of optimisation (like done on the edit relationship & edit bitstream tab) also still needed to be applied to the Content Source tab from edit collection so I also fixed this at the same time

Checklist

  • 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 yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn 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.
  • 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.

…& removed method calls retuning observables in edit collection's content source tab
…y-one_contribute-7.6' into w2p-113560_edit-item-add-relationships-one-by-one_contribute-7_x
@alexandrevryghem alexandrevryghem self-assigned this Jun 14, 2024
@alexandrevryghem alexandrevryghem changed the title W2p 113560 edit item add relationships one by one contribute 7 x Remove Bitstreams on edit-item-page doesn't work Jun 14, 2024
@alexandrevryghem alexandrevryghem changed the base branch from main to dspace-7_x June 14, 2024 21:09
@alexandrevryghem alexandrevryghem added bug high priority component: Item (Archived) Item display or editing port to main This PR needs to be ported to `main` branch for the next major release labels Jun 14, 2024
@alexandrevryghem alexandrevryghem marked this pull request as draft June 14, 2024 21:18
@alexandrevryghem
Copy link
Member Author

While testing this PR I discovered that the discard & save buttons were not automatically disabled again after deleting a bitstream. I tested this on the dspace-7.6 tag and was also able to reproduce it there. This is caused by a bigger caching issue, so I'm putting this PR as "Ready for review" and will try to contribute a fix for that issue too but this will most likely be for 8.1

@alexandrevryghem alexandrevryghem marked this pull request as ready for review June 16, 2024 20:11
@EikLoe
Copy link
Member

EikLoe commented Jun 17, 2024

Thanks @alexandrevryghem for the fix!
I tested it locally and it worked fine for me.

@tdonohue tdonohue self-requested a review June 17, 2024 14:23
@tdonohue tdonohue added this to the 7.6.2 milestone Jun 17, 2024
@tdonohue
Copy link
Member

Closing & reopening to reboot GitHub actions. (For some reason they didn't spin up properly with this PR.)

@tdonohue tdonohue closed this Jun 17, 2024
@tdonohue tdonohue reopened this Jun 17, 2024
@tdonohue
Copy link
Member

@alexandrevryghem : Is there also a main version of this PR? I believe this bug is occurring on both 7.x and main. (I tried pulling this PR into main but there's several conflicts)

@alexandrevryghem alexandrevryghem removed the port to main This PR needs to be ported to `main` branch for the next major release label Jun 17, 2024
@alexandrevryghem
Copy link
Member Author

@tdonohue: I created the port PR #3127

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 again @alexandrevryghem ! Tested this via #3127.. Verified this code is identical for 7.x.

@tdonohue tdonohue merged commit 31508ed into DSpace:dspace-7_x Jun 18, 2024
14 checks passed
@alexandrevryghem alexandrevryghem deleted the w2p-113560_edit-item-add-relationships-one-by-one_contribute-7_x branch June 18, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: Item (Archived) Item display or editing high priority
Projects
Development

Successfully merging this pull request may close these issues.

Remove Bitstreams on edit-item-page doesn't work
3 participants