Skip to content

Commit

Permalink
Merge pull request #873 from MetadataConsulting/MET-1282-show-version…
Browse files Browse the repository at this point in the history
…-in-search

MET-1282 show version number in search
  • Loading branch information
musketyr authored Nov 1, 2016
2 parents 60ad8e8 + 6a971fc commit 9fd79b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ abstract class CatalogueElementMarshaller extends AbstractMarshaller {
}

if (element.dataModel) {
return "${element.name} (${element.dataModel.name})"
return "${element.name} (${element.dataModel.name} ${element.dataModelSemanticVersion})"
}

return element.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class RelationshipISpec extends AbstractIntegrationSpec{
DataClass model = new DataClass(dataModel: classification, name: "Supermodel").save(failOnError: true)

then:
CatalogueElementMarshaller.getClassifiedName(model) == 'Supermodel (classy)'
CatalogueElementMarshaller.getClassifiedName(model) == 'Supermodel (classy 0.0.1)'

cleanup:
classification?.delete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SearchFunctionalSpec extends AbstractModelCatalogueGebSpec {
private static final String searchInput = '.modal-body .input-group-lg input'
private static final String firstItemFound = '.list-group-item.item-found:first-of-type'
private static final String firstItemFoundId = '.list-group-item.item-found:first-of-type .search-model-catalogue-id'
private static final String DATA_ELEMENT_NAME_WITH_DATA_MODEL = 'TESTCER SYMPTOMS FIRST NOTED DATE (NHIC)'
private static final String DATA_ELEMENT_NAME_WITH_DATA_MODEL = 'TESTCER SYMPTOMS FIRST NOTED DATE (NHIC 0.0.1)'
private static final String NAME_LOWER_CASE = 'testcer symptoms first note date'
private static final String PART_OF_DESCRIPTION = 'the time when the symptoms were first noted'
private static final String UNIQUE_EXTENSION_VALUE = 'TEST_27'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class ElasticSearchQueryList<T> implements JsonAwareListWithTotalAndType<T> {
versionNumber: source.get('version_number'),
latestVersionId: source.get('latest_id'),
dataModel: readSource(source.get('data_model')?.entity_id?.toString(), source.get('data_model') as Map<String, Object>),
classifiedName: source.get('data_model') ? "${source.get('name')} (${source.get('data_model').get('name')})" : source.get('name'),
classifiedName: source.get('data_model') ? "${source.get('name')} (${source.get('data_model').get('name')} ${source.get('data_model').get('semantic_version')})" : source.get('name'),
modelCatalogueId: source.get('model_catalogue_id'),
internalModelCatalogueId: source.get('internal_model_catalogue_id'),
description: source.get('description'),
Expand Down

0 comments on commit 9fd79b6

Please sign in to comment.