Skip to content

Feature/finished/iia 1892 submit other name causes exception in create mode#412

Merged
carldea merged 2 commits intoikmdev:mainfrom
jdsmithsos:feature/finished/IIA-1892-submit-other-name-causes-exception-in-create-mode
Apr 30, 2025
Merged

Feature/finished/iia 1892 submit other name causes exception in create mode#412
carldea merged 2 commits intoikmdev:mainfrom
jdsmithsos:feature/finished/IIA-1892-submit-other-name-causes-exception-in-create-mode

Conversation

@jdsmithsos
Copy link
Contributor

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.

image

After fix:

image

Note that the Concept is still in CREATE mode. An Axiom has not yet been created.

John JD Smith added 2 commits April 30, 2025 13:11
…n CREATE mode, so use the Other Name directly rather than getting using the semanticPublicId
Copy link
Contributor

@carldea carldea left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Make sure you've tested the creation of the new Concept contain the new Other name added.

@jdsmithsos
Copy link
Contributor Author

Looks good to me. Make sure you've tested the creation of the new Concept contain the new Other name added.

I tested these two scenarios with this change:

  • Create FQN then Axiom, which puts the Concept into EDIT mode, then create Other Name
  • Create FQN then Other Name, which Concept will still be in CREATE mode, then create Axiom, which goes to EDIT mode

@carldea carldea merged commit ba20445 into ikmdev:main Apr 30, 2025
6 checks passed
@jdsmithsos jdsmithsos deleted the feature/finished/IIA-1892-submit-other-name-causes-exception-in-create-mode branch May 1, 2025 12:14
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.

2 participants