Skip to content

[Port to dtq-dev] Issue ufal/clarin-dspace#1292 link/unlink items with version relationship#1253

Open
kosarko wants to merge 1 commit intodataquest-dev:dtq-devfrom
ufal:backport-1304-to-dtq-dev
Open

[Port to dtq-dev] Issue ufal/clarin-dspace#1292 link/unlink items with version relationship#1253
kosarko wants to merge 1 commit intodataquest-dev:dtq-devfrom
ufal:backport-1304-to-dtq-dev

Conversation

@kosarko
Copy link

@kosarko kosarko commented Feb 20, 2026

Port of ufal#1304 by @kuchtiak-ufal to dtq-dev.

* Issue 1292: script to allow link two items into version relationship

* implement link and unlink actions

* ItemVersionLinkerIT test

* improve ItemVersionLinkerIT, fix ScriptRestRepositoryIT

* resolve Copilot comments: Part 1

* resolve Copilot comments - part 2

* improve test to be more realistic

* improve options description

* better call of itemService.clearMetadata()

* clear correctly dc.relation.replaces and dc.relation.isreplacedby

* use dc.identifier.uri metadata value rather than item.getHandle() to set dc.relation.replaces and dc.relation.isreplacedby

* code-cleanup

* PR comments

* resolve PR comments (O. Kosarko)

* add also as a cli script

* Use Item.ANY instead of null

tested with the production db dump on the items mentions in the issue
(11234/1-5537). It was returning:
```
The script has started
Item '11234/1-5537' has no handle assigned.
```

because it's dc.identifier.uri.*

---------

Co-authored-by: Ondřej Košarko <kosarko@ufal.mff.cuni.cz>
Co-authored-by: Ondřej Košarko <ko_ok@centrum.cz>
(cherry picked from commit 903b35a)
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