Skip to content

MODLD-733: Marc 490 - Create ISSN node only when $x is present #101

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

pkjacob
Copy link
Contributor

@pkjacob pkjacob commented Jun 3, 2025

This is the exact same PR that was approved earlier - #99

I just realized that the previous PR was created against a wrong branch. :(

@pkjacob pkjacob force-pushed the pjacob/MODLD-733 branch from 307ea79 to 67ab24a Compare June 3, 2025 14:08
@pkjacob pkjacob changed the title Pjacob/modld 733 MODLD-733: Marc 490 - Create ISSN node only when $x is present Jun 3, 2025
Copy link

@Copilot 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

This PR ensures that an ISSN node is only created for MARC 490 when subfield $x is present.

  • Added a new test fixture without subfield $x to validate no ISSN mapping.
  • Extended the Marc2Ld490IT integration test to cover the "no ISSN" scenario.
  • Updated marc4ld.yml to include a marc2ldCondition that requires subfield x.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/test/resources/fields/490/marc_490_no_issn.jsonl New test resource for a 490 record missing subfield x
src/test/java/org/folio/marc4ld/mapper/field490/Marc2Ld490IT.java Added shouldMapField490WithoutIssn test and helper
src/main/resources/marc4ld.yml Added marc2ldCondition.fieldsAllOf for subfield x
Comments suppressed due to low confidence (1)

src/test/java/org/folio/marc4ld/mapper/field490/Marc2Ld490IT.java:73

  • [nitpick] Consider renaming hasNoIssnIdentifier to assertNoIssnIdentifierEdges to better convey its assertion behavior.
private void hasNoIssnIdentifier(Resource instanceSeries) {

@pkjacob pkjacob force-pushed the pjacob/MODLD-733 branch from 67ab24a to cc7035a Compare June 3, 2025 14:17
@folio-org folio-org deleted a comment from Copilot AI Jun 3, 2025
@pkjacob pkjacob requested a review from Copilot June 3, 2025 14:18
Copy link

@Copilot 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

This PR ensures that an ISSN node is only created for MARC field 490 when subfield $x is present by adding a new conditional in the mapping rules and covering the missing‐ISSN case in tests.

  • Introduce a JSON test fixture without $x to verify no ISSN mapping.
  • Add an integration test validating absence of ISSN edges.
  • Update marc4ld.yml to apply the ISSN mapping only if subfield x is present.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/test/resources/fields/490/marc_490_no_issn.jsonl New test input without an ISSN subfield
src/test/java/org/folio/marc4ld/mapper/field490/Marc2Ld490IT.java Integration test for the "no ISSN" scenario
src/main/resources/marc4ld.yml Added marc2ldCondition to require subfield x

Copy link

sonarqubecloud bot commented Jun 3, 2025

@pkjacob pkjacob merged commit 0c036c1 into master Jun 4, 2025
4 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.

3 participants