-
Notifications
You must be signed in to change notification settings - Fork 39
feature/finished/IIA-2440-language-selection-in-parent-causes-child-override #676
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
feature/finished/IIA-2440-language-selection-in-parent-causes-child-override #676
Conversation
| for (ObservableLanguageCoordinateBase observableLanguageCoordinateBase : this.languageCoordinates) { | ||
| var existingUuid = observableLanguageCoordinateBase.getLanguageCoordinateUuid(); | ||
|
|
||
| if (newUuid.equals(existingUuid)) { |
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.
@jdsmithsos ,
I will recommend to you to use Public id instead of UUID, since this is an array of ids, you might get a false negative.
Here is what I will recommend:
` for (LanguageCoordinate newLangCoord : newValue.languageCoordinates()) {
PublicId newPublicId = EntityService.get().getEntityFast(newLangCoord.getLanguageCoordinateUuid()).publicId();
for (ObservableLanguageCoordinateBase observableLanguageCoordinateBase : this.languageCoordinates) {
PublicId existingPublicId = EntityService.get().getEntityFast(observableLanguageCoordinateBase.getLanguageCoordinateUuid()).publicId();
if (PublicId.equals(existingPublicId, newPublicId)) {
...
..
}
}
}
`
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.
PublicId existingPublicId = EntityService.get().getEntityFast(observableLanguageCoordinateBase.getLanguageCoordinateUuid()).publicId();
if (PublicId.equals(existingPublicId, newPublicId)) {
I'll try this, thanks
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.
I couldn't get the pubicID check to work, so I changed the way that the value is set, using the same way that the ObservableViewWithOverride does, which just indexes through the list and sets based on the index
|
@swaroopsalvi There is not a parentID method available in LanguageCoordinate, which is why I am using the UUID |
… set, changed to the same was as the ObservableViewWithOverride sets the values
swaroopsalvi
left a comment
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.
Looks good.
Approved.
…-in-parent-causes-child-override
dholubek
left a comment
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.
looks good
…-in-parent-causes-child-override
…-in-parent-causes-child-override
Jira tickets:
https://ikmdev.atlassian.net/browse/IIA-2440
https://ikmdev.atlassian.net/browse/IIA-2441
Summary of changes: modified ObservableViewNoOverride.baseCoordinateChangedListenersRemoved() to set the value of existing LanguageCoordinates, rather than create new LanguageCoordinates objects
Before change: Changing the Parent language causes child view coordinates to go into Overridden mode
Select Journal view coordinate language to Spanish then back to English.
Child goes into Overridden mode.
After change: Child view coordinates no longer go into Overridden mode