Feature/finished/iia 1892 submit other name causes exception in create mode#412
Merged
carldea merged 2 commits intoikmdev:mainfrom Apr 30, 2025
Conversation
added 2 commits
April 30, 2025 13:11
…n CREATE mode, so use the Other Name directly rather than getting using the semanticPublicId
carldea
approved these changes
Apr 30, 2025
Contributor
carldea
left a comment
There was a problem hiding this comment.
Looks good to me.
Make sure you've tested the creation of the new Concept contain the new Other name added.
Contributor
Author
I tested these two scenarios with this change:
|
This file contains hidden or 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
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.
Jira ticket:
https://ikmdev.atlassian.net/browse/IIA-1892
The problem is actually in DetailsController.generateOtherNameRow(DescrName) and is caused by the MODE still being in CREATE.
During CREATE mode the otherName semanticId has not been set.
Only when the Concept goes into edit mode is the semanticId set, which is done within ConceptViewModel.createConcept(). But only if there is an Axiom defined in the Concept.
In CREATE mode the Fully Qualified Name and Other Names are stored in the ConceptViewModel, they have not yet been persisted.
When an Axiom exists and an Other Name is created, only then does the FQN and Other Name persist, and the other name’s sematicId is set.
Adding a conditional in generateOtherNameRow() for a null semanticId to use the other name as entered rather than using the semanticId to get the name fixes the problem.
After fix:
Note that the Concept is still in CREATE mode. An Axiom has not yet been created.