Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2018-08-15 18:52:21 -0400
committerRyan D. Brooks2018-09-05 12:26:32 -0400
commit869ec12f2c5ede2f3928c3f2e617a95ff60e9382 (patch)
tree88dd4f1effd37333e36ac24f6d92751cafa54f67
parent458179dd95e1ee83a0d37f6be852c6f5661b2ab1 (diff)
downloadorg.eclipse.osee-869ec12f2c5ede2f3928c3f2e617a95ff60e9382.tar.gz
org.eclipse.osee-869ec12f2c5ede2f3928c3f2e617a95ff60e9382.tar.xz
org.eclipse.osee-869ec12f2c5ede2f3928c3f2e617a95ff60e9382.zip
bug: Server fails to persist default attribute values
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java
index 61b801a3fd..070ee4236d 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java
@@ -570,8 +570,7 @@ public abstract class AttributeManagerImpl extends BaseId implements HasOrcsData
for (AttributeTypeToken attributeType : getValidAttributeTypes()) {
int missingCount = getRemainingAttributeCount(attributeType);
for (int i = 0; i < missingCount; i++) {
- Attribute<Object> attr = attributeFactory.createAttributeWithDefaults(this, getOrcsData(), attributeType);
- attr.clearDirty();
+ attributeFactory.createAttributeWithDefaults(this, getOrcsData(), attributeType);
}
}
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java
index b5e5cd6163..439852769c 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java
@@ -35,7 +35,6 @@ import org.eclipse.osee.orcs.data.AttributeTypes;
public abstract class AttributeImpl<T> implements Comparable<AttributeImpl<T>>, Attribute<T> {
private AttributeTypes attributeTypeCache;
private Reference<AttributeContainer> containerReference;
- private String defaultValue;
private Log logger;
private AttributeData<T> attributeData;
@@ -105,6 +104,7 @@ public abstract class AttributeImpl<T> implements Comparable<AttributeImpl<T>>,
}
protected void setToDefaultValue() {
+ String defaultValue = attributeTypeCache.getDefaultValue(attributeData.getType());
if (defaultValue != null) {
subClassSetValue(convertStringToValue(defaultValue));
}

Back to the top