Ticket #187 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Cannot add new term to NCI Thesaurus (Rat template, Strain field)

Reported by: e.vansomeren@… Owned by: business@…
Priority: major Milestone: Could have
Component: General Version:
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

During study creation, I created subjects of Rat template. This template has Strain as a field which is controlled by NCI Thesaurus Ontology. I can click add more, type in a query (wild), click on one of the visualized terms (Wilde Type). However, when I click Add term, it says
"Oops!
We could not add the ontology for this term, please try again "

Change History

Changed 3 years ago by business@…

  • owner set to work@…
  • status changed from new to assigned
  • milestone set to 0.8

This is directly caused by [1013], as revealed in the error message shown in catalina.out (below). Indirectly, it's caused by BioPortal? updating the NCI Thesaurus ontology to a newer version.

.rendering [templateSelect] with name [template] and value [-]
.rendering [ajaxButton] with name [add] and value [Add]
.start term / ontology editor flow
.rendering term selection popup
.ontology missing, first fetch ontology information
.encountered errors instantiating Ontology by versionedId [42693] :
  -org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'dbnp.data.Ontology' on field 'ncboId': rejected value [1032]; codes [dbnp.data.Ontology.ncboId.unique.error.dbnp.data.Ontology.ncboId,dbnp.data.Ontology.ncboId.unique.error.ncboId,dbnp.data.Ontology.ncboId.unique.error.int,dbnp.data.Ontology.ncboId.unique.error,ontology.ncboId.unique.error.dbnp.data.Ontology.ncboId,ontology.ncboId.unique.error.ncboId,ontology.ncboId.unique.error.int,ontology.ncboId.unique.error,dbnp.data.Ontology.ncboId.unique.dbnp.data.Ontology.ncboId,dbnp.data.Ontology.ncboId.unique.ncboId,dbnp.data.Ontology.ncboId.unique.int,dbnp.data.Ontology.ncboId.unique,ontology.ncboId.unique.dbnp.data.Ontology.ncboId,ontology.ncboId.unique.ncboId,ontology.ncboId.unique.int,ontology.ncboId.unique,unique.dbnp.data.Ontology.ncboId,unique.ncboId,unique.int,unique]; arguments [ncboId,class dbnp.data.Ontology,1032]; default message [Property [{0}] of class [{1}] with value [{2}] must be unique]
.oops? --> Cannot cast object 'false' with class 'java.lang.Boolean' to class 'dbnp.data.Ontology'
.rendering term selection popup

However, we don't want to revert [1013], because then we would run into #127 again.
So, #127 has to be dealt with and is scheduled for 0.8. Is there a way to circumvent this for now and have the newer version of the NCI Thesaurus in the CI database? Also, shouldn't the ontology widget show only terms from the version of the ontology that is currently stored in the database?

Assigning to Jeroen because this also entails laying out a strategy for #127.

Changed 3 years ago by business@…

There is an easy way around: as Robert just discovered it is possible to extract the NCBO id from the JSON in templatechooser.js. So we could just remove ontology versioning altogether and from now on just match on ncbo id. We could even remove 'ncboVersionedId' from the data model, or make it a map with versionid and version number.

Drawbacks of this approach: it is possible that a terms gets added, deleted in a later version of the ontology, and still remains in the cache in our database. Also, it is possible that the caption of a term changes, and the new caption will be added as a new term (depending on how exactly the termchooser checks whether the term exists already, we could even repair that).

Advantage: we always use an up to date version of the ontology and new terms are available as soon as the new ontology version is out. If we would couple our ontology template fields to versioned ontologies, then we would require manual admin intervention to 'update to the newest version of the ontology' (which will probably not happen and the term list in the term chooser will slowly get out of sync). But at the moment searching terms in versioned versions seems not even to be possible via JSON, so we would have to use Ontocat or something similar to accomplish that.

Changed 3 years ago by work@…

  • owner changed from work@… to business@…

refactored the termEditor to support ncboId's as main ontology identifier in r1176. However, the ncboVersionedId is also still supported if -for some reason- ncboId fails...

Please retest on ci

ps. note that you may experience some unexpected behaviour because the Chebi ontology is broken ( see #203 )

Changed 3 years ago by e.vansomeren@…

I've tested by trying to add a new strain to a rat template during study creation. Now it is possible to find and add a new term (in my case it was "SD, Rat Strain"). However when I close the ontology dialog, the newly added term does not appear in the dropdown box. Hope this info helps.

Changed 3 years ago by work@…

It was indeed reproducable on ci, but not on development (where it was working). Resolved the issue in svn r1192. Can you please retest on ci? It seems to work properly now...

Changed 3 years ago by e.vansomeren@…

  • status changed from assigned to closed
  • resolution set to fixed

It works perfect now on svn r1192, thanks!

Note: See TracTickets for help on using tickets.