VSB-TUO/feat: SAF Import/Update – embargo improvements & item page display#1287
Merged
milanmajchrak merged 2 commits intocustomer/vsb-tuofrom Mar 19, 2026
Merged
VSB-TUO/feat: SAF Import/Update – embargo improvements & item page display#1287milanmajchrak merged 2 commits intocustomer/vsb-tuofrom
milanmajchrak merged 2 commits intocustomer/vsb-tuofrom
Conversation
…at: rewrite SAF update to do in-place metadata and embargo update
There was a problem hiding this comment.
Pull request overview
Updates SAF import embargo handling and extends integration coverage around embargo behavior during imports and replacements/updates.
Changes:
- Shift embargo ResourcePolicy start date to
embargoend + 1 dayin import processing and update related assertions. - Refactor
replaceItems()behavior to update existing items’ metadata/embargo/licenses instead of delete + re-import. - Add an integration test covering SAF “replace/update” of metadata + embargo on an existing item.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| dspace-api/src/test/java/org/dspace/app/itemimport/EmbargoImportIT.java | Updates embargo start-date expectations and adds a SAF update/replace integration test. |
| dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java | Changes replace behavior to metadata/embargo update, adjusts embargo start-date calculation, and adds embargo-policy removal helper. |
You can also share your feedback on Copilot code review. Take the survey.
dspace-api/src/test/java/org/dspace/app/itemimport/EmbargoImportIT.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
startDate=dc.date.embargoend + 1 day(file becomes accessible the day after embargo ends).testSafUpdateMetadataAndEmbargointegration test.Modified files
ItemImportServiceImpl.java–processEmbargoMetadata(),replaceItems(), newremoveEmbargoFromItemBitstreams()EmbargoImportIT.java– updated assertions, new testAnalysis
(Write here, if there is needed describe some specific problem. Erase it, when it is not needed.)
Problems
(Write here, if some unexpected problems occur during solving issues. Erase it, when it is not needed.)
Manual Testing (if applicable)
Copilot review