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

refactor(reorder fields): keep order of MARC fields while Creating/Deriving/Editing MARC records. #858

Merged
merged 15 commits into from
Mar 19, 2024

Conversation

TsaghikKhachatryan
Copy link
Contributor

@TsaghikKhachatryan TsaghikKhachatryan commented Feb 19, 2024

Purpose

Keep the order of MARC fields while Creating/Deriving/Editing MARC records.

Approach

Created a method reorderMarcRecordFields to rearrange fields after the content has been processed by the Marc Reader. This Reader often changes the order back, which prevents the desired outcome.

Learning

https://folio-org.atlassian.net/browse/MODQM-407

reorder content fields

Closes: MODQM-379
refactor

Closes: MODQM-379
refactor

Closes: MODQM-407
refactor

Closes: MODQM-407
@TsaghikKhachatryan TsaghikKhachatryan changed the title refactor(reorder fields): keep order of Marc fields while Creating/Deriving/Editing MARC records. refactor(reorder fields): keep order of MARC fields while Creating/Deriving/Editing MARC records. Feb 19, 2024
Copy link

@TsaghikKhachatryan TsaghikKhachatryan merged commit dbc3de7 into master Mar 19, 2024
4 checks passed
@TsaghikKhachatryan TsaghikKhachatryan deleted the MODQM-407 branch March 19, 2024 16:08
@TsaghikKhachatryan TsaghikKhachatryan restored the MODQM-407 branch March 21, 2024 10:41
@@ -50,6 +59,8 @@ public final class AdditionalFieldsUtil {

private final static CacheLoader<Object, org.marc4j.marc.Record> parsedRecordContentCacheLoader;
private final static LoadingCache<Object, org.marc4j.marc.Record> parsedRecordContentCache;
private static final ObjectMapper objectMapper = new ObjectMapper();
Copy link
Contributor

Choose a reason for hiding this comment

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

For the future, consider reusing existing ObjectMappers.

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.

4 participants