Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Guss2018-08-17 14:19:18 -0400
committerDonald Dunne2018-08-20 18:59:27 -0400
commit62b56983089008448b39514898f9a58b6bbcc760 (patch)
tree5dcb3105af2563d23f78c339c1556a9c2b681860
parent91954c396283268b14dd85117835bea9a1527143 (diff)
downloadorg.eclipse.osee-62b56983089008448b39514898f9a58b6bbcc760.tar.gz
org.eclipse.osee-62b56983089008448b39514898f9a58b6bbcc760.tar.xz
org.eclipse.osee-62b56983089008448b39514898f9a58b6bbcc760.zip
bug[ats_TW10431]: Dispo timestamp date is incorrect on one or more operations
Change-Id: I4882dd6c56e36ca4a3657d15553992a1849cea32 Signed-off-by: Dominic Guss <Dominic.Guss@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java3
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java8
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java7
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java2
5 files changed, 14 insertions, 12 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
index 641f246bca..71331fc222 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.disposition.model;
-import java.util.Date;
import java.util.List;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
@@ -35,5 +34,5 @@ public interface DispoSet extends Identifiable<String> {
String getRerunList();
- Date getTime();
+ String getTime();
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
index 60c52dd57b..0d7a52757b 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.disposition.model;
-import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@@ -29,7 +28,7 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
private OperationReport operationSummary;
private String ciSet;
private String rerunList;
- private Date time;
+ private String time;
public DispoSetData() {
@@ -98,12 +97,11 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
}
@Override
- public Date getTime() {
+ public String getTime() {
return time;
}
- public void setTime(Date time) {
+ public void setTime(String time) {
this.time = time;
}
-
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
index 46fa8e365f..798846e4a9 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
@@ -534,7 +534,8 @@ public class DispoApiImpl implements DispoApi {
Note genOpNotes = generateOperationNotes(operation);
notesList.add(genOpNotes);
newSet.setNotesList(notesList);
- newSet.setTime(new Date());
+ DispoSetArtifact dispoSetArtifact = new DispoSetArtifact(author);
+ newSet.setTime(dispoSetArtifact.getTime());
// Generate report
getWriter().updateOperationSummary(author, branch, setToEdit.getGuid(), report);
@@ -661,10 +662,12 @@ public class DispoApiImpl implements DispoApi {
sb = sb.append(DispoStrings.IS_RUNNABLE);
sb = sb.append(DispoStrings.SCRIPT_ENTRY_END);
}
+
DispoSetData dispoSetData = new DispoSetData();
- dispoSetData.setTime(new Date());
dispoSetData.setRerunList(DispoStrings.BATCH_RERUN_LIST + sb.toString() + DispoStrings.BATCH_RERUN_LIST_END);
ArtifactReadable author = getQuery().findUser();
+ DispoSetArtifact dispoSetArtifact = new DispoSetArtifact(author);
+ dispoSetData.setTime(dispoSetArtifact.getTime());
storageProvider.get().updateDispoSet(author, branch, destSetId, dispoSetData);
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java
index 036554d298..0dc89fe3e9 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetArtifact.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.disposition.rest.internal;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -99,8 +100,9 @@ public class DispoSetArtifact extends BaseIdentity<String> implements DispoSet {
}
@Override
- public Date getTime() {
- return artifact.getSoleAttributeValue(DispoConstants.DispoTime, null);
+ public String getTime() {
+ SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
+ return sdf.format(new Date(System.currentTimeMillis()));
}
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
index f5099213fd..e231006f02 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
@@ -276,7 +276,7 @@ public class OrcsStorageImpl implements Storage {
String importPath = newData.getImportPath();
String ciSet = newData.getCiSet();
String rerunList = newData.getRerunList();
- Date time = newData.getTime();
+ String time = newData.getTime();
JSONArray notesList = null;
if (newData.getNotesList() != null) {

Back to the top