-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reorder content fields Closes: MODQM-379
refactor Closes: MODQM-379
refactor Closes: MODQM-407
refactor Closes: MODQM-407
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
add unit test for reorderMarcRecordFields method Closes: MODQM-407
refactoring Closes: MODQM-407
TsaghikKhachatryan
requested review from
psmagin,
viacheslavpoliakov,
viacheslavkol,
GeloPakDev1,
mukhiddin-yusuf,
KaterynaSenchenko and
a team
March 11, 2024 14:23
...rd-manager-server/src/main/java/org/folio/services/afterprocessing/AdditionalFieldsUtil.java
Outdated
Show resolved
Hide resolved
return targetContent instead of null value Closes: MODQM-407
create constant FIELDS Closes: MODQM-407
KaterynaSenchenko
approved these changes
Mar 19, 2024
psmagin
approved these changes
Mar 19, 2024
Quality Gate passedIssues Measures |
@@ -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(); |
There was a problem hiding this comment.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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