-
Notifications
You must be signed in to change notification settings - Fork 3
MODLD-962: Update label of the Title resource to include part number and part name #422
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,16 +59,16 @@ public void setProfileSettings(Integer profileId, CustomProfileSettingsRequestDt | |
| * being used, whether for settings editing or editor rendering. | ||
| */ | ||
| private CustomProfileSettingsResponseDto defaultToProfile(Integer profileId) { | ||
| return new CustomProfileSettingsResponseDto(false, null, profileId); | ||
| return new CustomProfileSettingsResponseDto(profileId, false, null); | ||
| } | ||
|
Comment on lines
61
to
63
|
||
|
|
||
| private CustomProfileSettingsResponseDto toDto(Integer profileId, UUID userId, ProfileSettings settings) { | ||
| try { | ||
| var customProfileSettings = objectMapper.readValue(settings.getSettings(), CustomProfileSettings.class); | ||
| return new CustomProfileSettingsResponseDto( | ||
| profileId, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The order of fields in the generated DTO class got changed due to the change made in pom file. |
||
| customProfileSettings.getActive(), | ||
| customProfileSettings.getChildren(), | ||
| profileId); | ||
| customProfileSettings.getChildren()); | ||
| } catch (JsonProcessingException e) { | ||
| log.error("Could not read stored profile settings (user: {}, profile: {}) - default to profile", | ||
| userId, profileId); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,7 +135,14 @@ public static List<String> getPrimaryMainTitles(List<TitleFieldRequestTitleInner | |
| .filter(PrimaryTitleField.class::isInstance) | ||
| .map(PrimaryTitleField.class::cast) | ||
| .map(PrimaryTitleField::getPrimaryTitle) | ||
| .map(pt -> join(" ", getFirstValue(pt::getMainTitle), getFirstValue(pt::getSubTitle))) | ||
| .map(pt -> join( | ||
| " ", | ||
| getFirstValue(pt::getMainTitle), | ||
| getFirstValue(pt::getSubTitle), | ||
| getFirstValue(pt::getPartNumber), | ||
| getFirstValue(pt::getPartName) | ||
| ) | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should move the label generation logic into a new LabelGenerator piece by piece when we change it somehow?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me check this again. |
||
| .map(String::trim) | ||
| .toList(); | ||
| } | ||
|
|
||
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.
Without this line, the generated
PrimaryTitle,ParallelTitleandVariantTitleclasses will not extend from theBaseTitleclass.Before this change
After this change