Skip to content

Commit

Permalink
Merge branch '5.8.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
hplahar committed Jan 7, 2021
2 parents 76d5242 + 0b275b5 commit 5b87173
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.jbei</groupId>
<artifactId>ice</artifactId>
<packaging>war</packaging>
<version>5.8.1</version>
<version>5.8.2</version>
<name>ice</name>
<description>Inventory of Composable Elements (ICE) for Synthetic Biology</description>
<repositories>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jbei/ice/lib/config/SiteSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/jbei/ice/lib/entry/sequence/PartSequence.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ static FeaturedDNASequence sequenceToDNASequence(Sequence sequence, List<Sequenc

dnaFeature.setId(sequenceFeature.getId());
dnaFeature.setType(sequenceFeature.getGenbankType());
dnaFeature.setName(sequenceFeature.getName());
String name = sequenceFeature.getFeature() != null ? sequenceFeature.getFeature().getName() : sequenceFeature.getName();
dnaFeature.setName(name);
dnaFeature.setStrand(sequenceFeature.getStrand());

if (sequenceFeature.getAnnotationType() != null) {
Expand Down
14 changes: 13 additions & 1 deletion src/main/webapp/scripts/entry/entryController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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})
}
}
}
}

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/views/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
<div class="text-right" style="white-space: nowrap;">
&copy;&nbsp;<a href="https://github.com/JBEI/ice">JBEI ICE Registry</a> <span
class="label label-primary">5.8.1</span><br>
class="label label-primary">5.8.2</span><br>
All rights reserved. <br>
<a href="https://github.com/JBEI/ice/issues/new">Submit an Issue</a>&nbsp; <span class="text-muted">|</span>
&nbsp;<a href="http://ice.jbei.org/">Help</a>
Expand Down

0 comments on commit 5b87173

Please sign in to comment.