From 3f7e2d6c74c56e3fb35b8b8aca6521e5a8f27e92 Mon Sep 17 00:00:00 2001 From: Hector Plahar Date: Wed, 23 Dec 2020 09:00:37 -1000 Subject: [PATCH 1/3] bug fix: properly convert openVE notes model to ICE model --- src/main/webapp/scripts/entry/entryController.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/scripts/entry/entryController.js b/src/main/webapp/scripts/entry/entryController.js index 6868b0b53..9e21a524b 100644 --- a/src/main/webapp/scripts/entry/entryController.js +++ b/src/main/webapp/scripts/entry/entryController.js @@ -647,12 +647,22 @@ angular.module('ice.entry.controller', []) type: feature.type, name: feature.name, strand: feature.forward ? 1 : -1, - notes: [{name: "note", value: feature.notes}], locations: [{ genbankStart: feature.start + 1, end: feature.end + 1 }] }; + + // set notes + if (feature.notes) { + featureMap[feature.id].notes = []; + for (const prop in feature.notes) { + if (!feature.notes.hasOwnProperty(prop)) + continue; + + featureMap[feature.id].notes.push({name: "note", value: prop}) + } + } } } @@ -663,6 +673,8 @@ angular.module('ice.entry.controller', []) sequence.features.push(featureMap[property]); } + console.log(sequence.features); + Util.update("rest/parts/" + entry.id + "/sequence", sequence, {}, function (result) { console.log("save completed for", entry.id); From 3b78fa15612d0b6df706db4ef053e35c4c1da26f Mon Sep 17 00:00:00 2001 From: Hector Plahar Date: Tue, 5 Jan 2021 14:19:42 -0800 Subject: [PATCH 2/3] bug fix: update feature on name or type change --- .../jbei/ice/lib/entry/sequence/PartSequence.java | 12 ++++++++++++ .../jbei/ice/lib/entry/sequence/SequenceUtil.java | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jbei/ice/lib/entry/sequence/PartSequence.java b/src/main/java/org/jbei/ice/lib/entry/sequence/PartSequence.java index a42784af0..7a3f61ff4 100644 --- a/src/main/java/org/jbei/ice/lib/entry/sequence/PartSequence.java +++ b/src/main/java/org/jbei/ice/lib/entry/sequence/PartSequence.java @@ -362,6 +362,18 @@ private void checkForUpdatedFeatures(Sequence existing, Sequence updated) { // for each existing feature, check with updated for difference in name and type for (SequenceFeature updatedSequenceFeature : updated.getSequenceFeatures()) { Feature sequenceFeature = updatedSequenceFeature.getFeature(); + Feature existingFeatureFeature = existingFeature.getFeature(); + + if (!sequenceFeature.getHash().equals(existingFeatureFeature.getHash())) + continue; + + if (!sequenceFeature.getName().equals(existingFeatureFeature.getName()) || + !sequenceFeature.getGenbankType().equals(existingFeatureFeature.getGenbankType())) { + // update + existingFeatureFeature.setName(sequenceFeature.getName()); + existingFeatureFeature.setGenbankType(sequenceFeature.getGenbankType()); + featureDAO.update(existingFeatureFeature); + } } } } diff --git a/src/main/java/org/jbei/ice/lib/entry/sequence/SequenceUtil.java b/src/main/java/org/jbei/ice/lib/entry/sequence/SequenceUtil.java index 67fd1e627..5e9d6b39c 100644 --- a/src/main/java/org/jbei/ice/lib/entry/sequence/SequenceUtil.java +++ b/src/main/java/org/jbei/ice/lib/entry/sequence/SequenceUtil.java @@ -137,7 +137,8 @@ static FeaturedDNASequence sequenceToDNASequence(Sequence sequence, List Date: Thu, 7 Jan 2021 08:20:55 -0800 Subject: [PATCH 3/3] version 5.8.2 label --- pom.xml | 2 +- src/main/java/org/jbei/ice/lib/config/SiteSettings.java | 2 +- src/main/webapp/views/footer.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index c3643e137..490a4e048 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jbei ice war - 5.8.1 + 5.8.2 ice Inventory of Composable Elements (ICE) for Synthetic Biology diff --git a/src/main/java/org/jbei/ice/lib/config/SiteSettings.java b/src/main/java/org/jbei/ice/lib/config/SiteSettings.java index 690c0df92..ef6fefd57 100644 --- a/src/main/java/org/jbei/ice/lib/config/SiteSettings.java +++ b/src/main/java/org/jbei/ice/lib/config/SiteSettings.java @@ -9,7 +9,7 @@ */ public class SiteSettings implements IDataTransferModel { - private String version = "5.8.1"; + private String version = "5.8.2"; private String assetName; private boolean hasLogo; private boolean hasLoginMessage; diff --git a/src/main/webapp/views/footer.html b/src/main/webapp/views/footer.html index abe97647f..04c8db1ac 100644 --- a/src/main/webapp/views/footer.html +++ b/src/main/webapp/views/footer.html @@ -11,7 +11,7 @@
© JBEI ICE Registry 5.8.1
+ class="label label-primary">5.8.2
All rights reserved.
Submit an Issue  |  Help