Skip to content

fix(harvester): do not map ISBN to imprint - #955

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/harvester-imprint-isbn-medium
Open

fix(harvester): do not map ISBN to imprint#955
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/harvester-imprint-isbn-medium

Conversation

@TahaKhan998

@TahaKhan998 TahaKhan998 commented Sep 1, 2026

Copy link
Copy Markdown

closes #457
ImprintMapper was putting ISBNs into imprint.isbn, but after checking with Fleur, imprint doesn’t need an ISBN. So this PR stops mapping ISBN into imprint at all. All ISBNs still go to related_identifiers / Related Works, print, online, or no medium, that path was already fine. Added a test that imprint only keeps place and both print and online ISBNs land in related_identifiers.

I looked at IdentifiersMapper and RelatedIdentifiersMapper in identifiers.py, compared it to invenio.cfg, and basically only cds, aleph, cdsrn and apprn go to metadata.identifiers. Everything else like isbn, arxiv, urn, inspire, non CERN report numbers and extra dois go to metadata.related_identifiers, and the main doi goes to pids.doi, not those metadata fields. isbn used to go to identifiers wrongly but that’s already fixed, it only goes to related_identifiers. test_transformer.py covers this too.

@TahaKhan998
TahaKhan998 force-pushed the fix/harvester-imprint-isbn-medium branch from 3fbb3b5 to 7d796e2 Compare September 2, 2026 15:15
@TahaKhan998 TahaKhan998 changed the title fix(harvester): fall back to any ISBN for imprint when none is online fix(harvester): keep ISBNs in related identifiers only Sep 2, 2026
@TahaKhan998 TahaKhan998 changed the title fix(harvester): keep ISBNs in related identifiers only fix(harvester): do not map ISBN to imprint Sep 2, 2026
assert result["place"] == "New York"
assert result["isbn"] == "978-3-16-148410-0"
assert imprint == {"place": "New York"}
assert "isbn" not in imprint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this check needed if we are already checking imprint against it's exact value just above this line?

@TahaKhan998
TahaKhan998 force-pushed the fix/harvester-imprint-isbn-medium branch from 7d796e2 to 6e93e31 Compare September 3, 2026 07:31
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.

transformer: adjust imprint isbns custom field to non-thesis cases

2 participants