Skip to content

VSB-TUO/feat: SAF Import/Update – embargo improvements & item page display#1287

Merged
milanmajchrak merged 2 commits intocustomer/vsb-tuofrom
vsb-tuo/edison-update
Mar 19, 2026
Merged

VSB-TUO/feat: SAF Import/Update – embargo improvements & item page display#1287
milanmajchrak merged 2 commits intocustomer/vsb-tuofrom
vsb-tuo/edison-update

Conversation

@milanmajchrak
Copy link
Collaborator

@milanmajchrak milanmajchrak commented Mar 18, 2026

Problem description

  1. Embargo date +1 day – Resource policy startDate = dc.date.embargoend + 1 day (file becomes accessible the day after embargo ends).
  2. Tests – Updated embargo assertions for +1 day. Added testSafUpdateMetadataAndEmbargo integration test.

Modified files

  • ItemImportServiceImpl.javaprocessEmbargoMetadata(), replaceItems(), new removeEmbargoFromItemBitstreams()
  • EmbargoImportIT.java – updated assertions, new test

Analysis

(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

  • Requested review from Copilot

…at: rewrite SAF update to do in-place metadata and embargo update
Copilot AI review requested due to automatic review settings March 18, 2026 14:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 day in 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.

@milanmajchrak milanmajchrak merged commit c37bec3 into customer/vsb-tuo Mar 19, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants