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

Bugfix/delete referenced by bulk job #1538

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

kwahlin
Copy link
Contributor

@kwahlin kwahlin commented Dec 11, 2024

https://libris.kb.se/katalogisering/8tgnxg2q6d26k657 failed due to the term to deprecate (https://id.kb.se/term/barn/%C3%85lderdomshem) being referenced in another bulk:Job which prevented the term from being deleted. We should not exclude all links in bulk:Job from relinking but rather exclude links in bulk:depŕecatespecifically.

Also fixed the error message which I think was very confusing, see https://libris.kb.se/_bulk-change/reports/8tgnxg2q6d26k657-2024-12-11T133742/ERRORS.txt. Only k4rz49t1h5nfxls5 at bulk:changeSpec.bulk:matchForm.instanceOf.subject is of interest, the rest are just records linking to k4rz49t1h5nfxls5 (directly or indirectly). This information is already available via "Används i" in the cat client anyway.

@kwahlin kwahlin requested a review from olovy December 11, 2024 15:40
@@ -2773,8 +2773,7 @@ class PostgreSQLComponent {
def allow = JsonLd.ALLOW_LINK_TO_DELETED + (jsonld?.cascadingDeleteRelations() ?: Collections.EMPTY_SET)
def referencedBy = followDependers(identifier, allow)
Copy link
Contributor

Choose a reason for hiding this comment

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

Note to selves: the actual problem is that we are using followDependers though we only care about docs linking directly to the doc being deleted? But there are only links when we block the delete so probably fine.

Changed in 230fe6f

@kwahlin kwahlin merged commit 7638f76 into develop Dec 12, 2024
1 check passed
@kwahlin kwahlin deleted the bugfix/delete-referenced-by-bulk-job branch December 12, 2024 06:56
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