Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-08-04 20:40:40 +0000
committerRoberto E. Escobar2014-09-29 22:55:00 +0000
commit52669c2decc7bf87aac33295a1474f96cd9325f7 (patch)
tree0077c40185369de6b19865297dcf7658dd4b5b44
parent0c317494d60ac8841088d051831de3139733c137 (diff)
downloadorg.eclipse.osee-52669c2decc7bf87aac33295a1474f96cd9325f7.tar.gz
org.eclipse.osee-52669c2decc7bf87aac33295a1474f96cd9325f7.tar.xz
org.eclipse.osee-52669c2decc7bf87aac33295a1474f96cd9325f7.zip
feature[ats_ATS64164]: CPA: Move Role and UserRole to ats.api
-rw-r--r--plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java (renamed from plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/Role.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/UserRole.java (renamed from plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRole.java)27
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/AtsXUserRoleValidatorTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java1
-rw-r--r--plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/UserRoleTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/notify/AtsNotifyUsers.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java31
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleValidator.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewAuthorColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewModeratorColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewReviewerColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/NewRoleDialog.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleLabelProvider.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerReviewRoleColumn.java5
26 files changed, 85 insertions, 78 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF
index 0cf33f4370b..58e6cd3d8b3 100644
--- a/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF
@@ -30,4 +30,5 @@ Import-Package: org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.util,
org.eclipse.osee.framework.jdk.core.type,
- org.eclipse.osee.framework.jdk.core.util
+ org.eclipse.osee.framework.jdk.core.util,
+ org.eclipse.osee.framework.logging
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/Role.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java
index 24e1d63c116..946ba6fe983 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/Role.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.core.client.review.role;
+package org.eclipse.osee.ats.api.review;
import java.util.Collection;
import java.util.HashSet;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRole.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/UserRole.java
index 0e4bebd9730..67e444b5dc8 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRole.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/UserRole.java
@@ -8,20 +8,17 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.core.client.review.role;
+package org.eclipse.osee.ats.api.review;
+import java.rmi.activation.Activator;
import java.text.NumberFormat;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.core.client.internal.Activator;
-import org.eclipse.osee.ats.core.client.internal.AtsClientService;
-import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AXml;
import org.eclipse.osee.framework.jdk.core.util.GUID;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.User;
/**
* @author Donald G. Dunne
@@ -34,10 +31,6 @@ public class UserRole {
private String guid = GUID.create();
private Boolean completed = false;
- public UserRole() throws OseeCoreException {
- this(Role.Reviewer, AtsClientService.get().getUserService().getCurrentUser().getUserId(), null, false);
- }
-
public UserRole(Role role, IAtsUser user) throws OseeCoreException {
this(role, user.getUserId());
}
@@ -124,22 +117,10 @@ public class UserRole {
this.role = role;
}
- public IAtsUser getUser() throws OseeCoreException {
- return AtsClientService.get().getUserService().getUserById(userId);
- }
-
- public void setUser(User user) throws OseeCoreException {
- this.userId = user.getUserId();
- }
-
public Double getHoursSpent() {
return hoursSpent;
}
- public String getHoursSpentStr() {
- return hoursSpent == null ? "" : AtsUtilCore.doubleToI18nString(hoursSpent, true);
- }
-
public void setHoursSpent(Double hoursSpent) {
this.hoursSpent = hoursSpent;
}
@@ -163,4 +144,8 @@ public class UserRole {
public String getUserId() {
return userId;
}
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF
index f453d2c4436..5bc39446156 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF
@@ -21,6 +21,7 @@ Import-Package: org.eclipse.core.filesystem,
org.eclipse.osee.ats.api.ai,
org.eclipse.osee.ats.api.commit,
org.eclipse.osee.ats.api.data,
+ org.eclipse.osee.ats.api.review,
org.eclipse.osee.ats.api.rule,
org.eclipse.osee.ats.api.team,
org.eclipse.osee.ats.api.user,
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
index 71f623ce60e..a335577cd9b 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
@@ -15,6 +15,8 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.client.demo.DemoArtifactTypes;
@@ -32,8 +34,6 @@ import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Disposition;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.InjectionActivity;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Severity;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java
index 7d83f892e43..303b0662f27 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/PeerToPeerReviewColumnsTest.java
@@ -13,6 +13,8 @@ package org.eclipse.osee.ats.client.integration.tests.ats.column;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.client.demo.DemoUsers;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
@@ -30,8 +32,6 @@ import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Dispositi
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.InjectionActivity;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Severity;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectManager;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java
index b738ce7836e..15f7b4901ec 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/notify/AtsNotificationManagerTest.java
@@ -15,6 +15,8 @@ import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.team.ChangeType;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
@@ -29,8 +31,6 @@ import org.eclipse.osee.ats.core.client.notify.AtsNotificationManager.Configurat
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewManager;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java
index 12eb3fee49c..2d99ae00edd 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItemTest.java
@@ -12,6 +12,8 @@ package org.eclipse.osee.ats.client.integration.tests.ats.editor.stateItem;
import static org.junit.Assert.assertFalse;
import java.util.Arrays;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
@@ -19,8 +21,6 @@ import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewManager;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.editor.stateItem.AtsPeerToPeerReviewReviewStateItem;
diff --git a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/AtsXUserRoleValidatorTest.java b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/AtsXUserRoleValidatorTest.java
index ddbb0fffe2f..5308dd161eb 100644
--- a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/AtsXUserRoleValidatorTest.java
+++ b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/AtsXUserRoleValidatorTest.java
@@ -13,6 +13,8 @@ package org.eclipse.osee.ats.core.client.review.role;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workdef.WidgetOption;
import org.eclipse.osee.ats.api.workdef.WidgetResult;
diff --git a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java
index 599db6de713..d492f629150 100644
--- a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java
+++ b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.core.validator.IValueProvider;
import org.eclipse.osee.framework.jdk.core.util.AXml;
diff --git a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/UserRoleTest.java b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/UserRoleTest.java
index bf3a3d7a39b..8bdf129be29 100644
--- a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/UserRoleTest.java
+++ b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/UserRoleTest.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.client.review.role;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.junit.Assert;
/**
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/notify/AtsNotifyUsers.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/notify/AtsNotifyUsers.java
index f60e1cd8f1b..0beeac80b36 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/notify/AtsNotifyUsers.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/notify/AtsNotifyUsers.java
@@ -17,12 +17,12 @@ import java.util.HashSet;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.notify.AtsNotifyType;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.core.client.internal.Activator;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.review.AbstractReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.util.SubscribeManager;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
@@ -124,7 +124,7 @@ public class AtsNotifyUsers {
Collection<IAtsUser> authorModerator = new ArrayList<IAtsUser>();
for (UserRole role : roleMgr.getUserRoles()) {
if (role.getRole() == Role.Author || role.getRole() == Role.Moderator) {
- authorModerator.add(role.getUser());
+ authorModerator.add(AtsClientService.get().getUserService().getUserById(role.getUserId()));
}
}
authorModerator = AtsUsersUtility.getValidEmailUsers(authorModerator);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java
index 93696e80af5..c9fe1358777 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItemProvider;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IStateToken;
@@ -27,7 +28,7 @@ import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.core.client.action.ActionArtifact;
import org.eclipse.osee.ats.core.client.config.ActionableItemManager;
import org.eclipse.osee.ats.core.client.internal.Activator;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
+import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
@@ -58,8 +59,9 @@ public abstract class AbstractReviewArtifact extends AbstractWorkflowArtifact im
} else {
List<IAtsUser> users = getImplementersByState(this, PeerToPeerReviewState.Review);
for (UserRole role : UserRoleManager.getUserRoles(this)) {
- if (!users.contains(role.getUser())) {
- users.add(role.getUser());
+ IAtsUser atsUser = AtsClientService.get().getUserService().getUserById(role.getUserId());
+ if (!users.contains(atsUser)) {
+ users.add(atsUser);
}
}
return users;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java
index e4975cdb14f..39f6f2d6879 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
@@ -31,7 +32,6 @@ import org.eclipse.osee.ats.api.workflow.transition.TransitionResults;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectManager;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java
index a0ae9320990..1ddd19177a1 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java
@@ -18,6 +18,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.notify.AtsNotifyType;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.core.client.internal.Activator;
@@ -27,6 +29,7 @@ import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectManager;
import org.eclipse.osee.ats.core.client.validator.ArtifactValueProvider;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.validator.IValueProvider;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
@@ -105,8 +108,9 @@ public class UserRoleManager {
public List<IAtsUser> getRoleUsers(Role role) throws OseeCoreException {
List<IAtsUser> users = new ArrayList<IAtsUser>();
for (UserRole uRole : getUserRoles()) {
- if (uRole.getRole() == role && !users.contains(uRole.getUser())) {
- users.add(uRole.getUser());
+ if (uRole.getRole() == role && !users.contains(AtsClientService.get().getUserService().getUserById(
+ uRole.getUserId()))) {
+ users.add(AtsClientService.get().getUserService().getUserById(uRole.getUserId()));
}
}
return users;
@@ -209,8 +213,9 @@ public class UserRoleManager {
}
if (!found) {
roleItems.add(userRole);
- if (!peerArt.getAssignees().contains(userRole.getUser())) {
- peerArt.getStateMgr().addAssignee(userRole.getUser());
+ IAtsUser atsUser = AtsClientService.get().getUserService().getUserById(userRole.getUserId());
+ if (!peerArt.getAssignees().contains(atsUser)) {
+ peerArt.getStateMgr().addAssignee(atsUser);
}
}
}
@@ -224,23 +229,23 @@ public class UserRoleManager {
StringBuilder builder = new StringBuilder();
builder.append("<TABLE BORDER=\"1\" cellspacing=\"1\" cellpadding=\"3%\" width=\"100%\"><THEAD><TR><TH>Role</TH>" + "<TH>User</TH><TH>Hours</TH><TH>Major</TH><TH>Minor</TH><TH>Issues</TH>");
for (UserRole item : getUserRoles(peerArt)) {
- IAtsUser user = item.getUser();
+ IAtsUser atsUser = AtsClientService.get().getUserService().getUserById(item.getUserId());
String name = "";
- if (user != null) {
- name = user.getName();
+ if (atsUser != null) {
+ name = atsUser.getName();
if (!Strings.isValid(name)) {
- name = user.getName();
+ name = atsUser.getName();
}
}
builder.append("<TR>");
builder.append("<TD>" + item.getRole().name() + "</TD>");
- builder.append("<TD>" + item.getUser().getName() + "</TD>");
- builder.append("<TD>" + item.getHoursSpentStr() + "</TD>");
+ builder.append("<TD>" + atsUser.getName() + "</TD>");
+ builder.append("<TD>" + AtsUtilCore.doubleToI18nString(item.getHoursSpent(), true) + "</TD>");
ReviewDefectManager defectMgr = new ReviewDefectManager(peerArt);
- builder.append("<TD>" + defectMgr.getNumMajor(item.getUser()) + "</TD>");
- builder.append("<TD>" + defectMgr.getNumMinor(item.getUser()) + "</TD>");
- builder.append("<TD>" + defectMgr.getNumIssues(item.getUser()) + "</TD>");
+ builder.append("<TD>" + defectMgr.getNumMajor(atsUser) + "</TD>");
+ builder.append("<TD>" + defectMgr.getNumMinor(atsUser) + "</TD>");
+ builder.append("<TD>" + defectMgr.getNumIssues(atsUser) + "</TD>");
builder.append("</TR>");
}
builder.append("</TABLE>");
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleValidator.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleValidator.java
index db721817be6..96e2402bd7b 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleValidator.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleValidator.java
@@ -12,6 +12,8 @@ package org.eclipse.osee.ats.core.client.review.role;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.core.client.internal.Activator;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewAuthorColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewAuthorColumn.java
index 8bcef6f5b88..fbd571bbd8f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewAuthorColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewAuthorColumn.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.column;
import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.osee.ats.api.review.Role;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.role.Role;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewModeratorColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewModeratorColumn.java
index 79277e30f03..5b59a485dce 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewModeratorColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewModeratorColumn.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.column;
import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.osee.ats.api.review.Role;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.role.Role;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewReviewerColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewReviewerColumn.java
index 4330dcec9d4..ac0148c749d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewReviewerColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewReviewerColumn.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.column;
import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.osee.ats.api.review.Role;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.role.Role;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java
index c72c0b651c8..73d55975a70 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java
@@ -15,6 +15,7 @@ import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.review.IAtsPeerToPeerReview;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.workdef.IStateToken;
@@ -22,8 +23,8 @@ import org.eclipse.osee.ats.api.workflow.transition.ITransitionListener;
import org.eclipse.osee.ats.api.workflow.transition.TransitionResults;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -48,7 +49,7 @@ public class AtsPeerToPeerReviewReviewStateItem extends AtsStateItem implements
PeerToPeerReviewArtifact peerArt = (PeerToPeerReviewArtifact) workItem;
for (UserRole uRole : UserRoleManager.getUserRoles(peerArt)) {
if (!uRole.isCompleted()) {
- assignees.add(uRole.getUser());
+ assignees.add(AtsClientService.get().getUserService().getUserById(uRole.getUserId()));
}
}
assignees.addAll(workItem.getStateMgr().getAssignees());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/NewRoleDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/NewRoleDialog.java
index 21ab36439cd..c60523ee59d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/NewRoleDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/NewRoleDialog.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.util.widgets.role;
import java.util.Collection;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osee.ats.api.review.Role;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.core.client.review.role.Role;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java
index 33cc61750fd..2b01c17f449 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java
@@ -15,7 +15,7 @@ import java.util.Collection;
import java.util.HashSet;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.ui.swt.Displays;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleLabelProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleLabelProvider.java
index ef3bb3b8721..3e7c3e0db66 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleLabelProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleLabelProvider.java
@@ -15,9 +15,10 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerLabelProvider;
import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.api.review.UserRole;
+import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Severity;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectManager;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
@@ -46,7 +47,8 @@ public class UserRoleLabelProvider extends XViewerLabelProvider {
UserRole roleItem = (UserRole) element;
try {
if (dCol.equals(UserRoleXViewerFactory.User_Col)) {
- return ArtifactImageManager.getImage(AtsClientService.get().getUserServiceClient().getOseeUser(roleItem.getUser()));
+ return ArtifactImageManager.getImage(AtsClientService.get().getUserServiceClient().getOseeUser(
+ AtsClientService.get().getUserService().getUserById(roleItem.getUserId())));
} else if (dCol.equals(UserRoleXViewerFactory.Role_Col)) {
return ImageManager.getImage(AtsImage.ROLE);
} else if (dCol.equals(UserRoleXViewerFactory.Hours_Spent_Col)) {
@@ -70,8 +72,9 @@ public class UserRoleLabelProvider extends XViewerLabelProvider {
public String getColumnText(Object element, XViewerColumn aCol, int columnIndex) throws OseeCoreException {
UserRole defectItem = (UserRole) element;
+ IAtsUser atsUser = AtsClientService.get().getUserService().getUserById(defectItem.getUserId());
if (aCol.equals(UserRoleXViewerFactory.User_Col)) {
- return defectItem.getUser().getName();
+ return atsUser.getName();
} else if (aCol.equals(UserRoleXViewerFactory.Hours_Spent_Col)) {
return defectItem.getHoursSpent() == null ? "" : AtsUtilCore.doubleToI18nString(defectItem.getHoursSpent(),
false);
@@ -81,13 +84,13 @@ public class UserRoleLabelProvider extends XViewerLabelProvider {
return String.valueOf(defectItem.isCompleted());
} else if (aCol.equals(UserRoleXViewerFactory.Num_Major_Col)) {
ReviewDefectManager defectMgr = new ReviewDefectManager(xViewer.getXUserRoleViewer().getReviewArt());
- return defectMgr.getNumMajor(defectItem.getUser()) + "";
+ return defectMgr.getNumMajor(atsUser) + "";
} else if (aCol.equals(UserRoleXViewerFactory.Num_Minor_Col)) {
ReviewDefectManager defectMgr = new ReviewDefectManager(xViewer.getXUserRoleViewer().getReviewArt());
- return defectMgr.getNumMinor(defectItem.getUser()) + "";
+ return defectMgr.getNumMinor(atsUser) + "";
} else if (aCol.equals(UserRoleXViewerFactory.Num_Issues_Col)) {
ReviewDefectManager defectMgr = new ReviewDefectManager(xViewer.getXUserRoleViewer().getReviewArt());
- return defectMgr.getNumIssues(defectItem.getUser()) + "";
+ return defectMgr.getNumIssues(atsUser) + "";
}
return "unhandled column";
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java
index 6401cfc6244..36db9b12c7e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java
@@ -21,8 +21,8 @@ import org.eclipse.nebula.widgets.xviewer.XPromptChange;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.nebula.widgets.xviewer.util.EnumStringSingleSelectionDialog;
-import org.eclipse.osee.ats.core.client.review.role.Role;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
+import org.eclipse.osee.ats.api.review.Role;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
@@ -203,8 +203,8 @@ public class UserRoleXViewer extends XViewer {
private boolean setUser(Collection<UserRole> userRoles, User user) throws OseeCoreException {
boolean modified = false;
for (UserRole userRole : userRoles) {
- if (user != null && !userRole.getUser().equals(user)) {
- userRole.setUser(user);
+ if (user != null && !userRole.getUserId().equals(user.getUserId())) {
+ userRole.setUserId(user.getUserId());
if (!modified) {
modified = true;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java
index 9cb935b2046..5e37fd5f0ae 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java
@@ -26,17 +26,19 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.window.Window;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectManager;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleError;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
import org.eclipse.osee.ats.core.client.review.role.UserRoleValidator;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
@@ -433,13 +435,14 @@ public class XUserRoleViewer extends GenericXWidget implements IArtifactWidget,
"Issues"}));
ReviewDefectManager defectMgr = new ReviewDefectManager(reviewArt);
for (UserRole item : roleMgr.getUserRoles()) {
+ IAtsUser atsUser = AtsClientService.get().getUserService().getUserById(item.getUserId());
html.append(AHTML.addRowMultiColumnTable(new String[] {
item.getRole().name(),
- item.getUser().getName(),
- item.getHoursSpentStr(),
- defectMgr.getNumMajor(item.getUser()) + "",
- defectMgr.getNumMinor(item.getUser()) + "",
- defectMgr.getNumIssues(item.getUser()) + ""}));
+ atsUser.getName(),
+ AtsUtilCore.doubleToI18nString(item.getHoursSpent(), true),
+ defectMgr.getNumMajor(atsUser) + "",
+ defectMgr.getNumMinor(atsUser) + "",
+ defectMgr.getNumIssues(atsUser) + ""}));
}
html.append(AHTML.endBorderTable());
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerReviewRoleColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerReviewRoleColumn.java
index 1b7991887c6..5c58a809698 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerReviewRoleColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerReviewRoleColumn.java
@@ -13,10 +13,11 @@ package org.eclipse.osee.ats.util.xviewer.column;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.util.XViewerException;
+import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.core.client.review.AbstractReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.role.UserRole;
import org.eclipse.osee.ats.core.client.review.role.UserRoleManager;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.swt.SWT;
@@ -62,7 +63,7 @@ public class XViewerReviewRoleColumn extends XViewerValueColumn {
private static String getRolesStr(AbstractReviewArtifact reviewArt, IAtsUser user) throws OseeCoreException {
StringBuilder builder = new StringBuilder();
for (UserRole role : UserRoleManager.getUserRoles(reviewArt)) {
- if (role.getUser().equals(user)) {
+ if (AtsClientService.get().getUserService().getUserById(role.getUserId()).equals(user)) {
builder.append(role.getRole().name());
builder.append(", ");
}

Back to the top