Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2018-03-19 17:10:48 -0400
committerDonald Dunne2018-03-21 10:42:05 -0400
commit269470b46196c790af7e566d01171d503298e223 (patch)
tree4676aca244103fd9fb4109f04fd4819884e298cb
parent52c07567e02cdb160ac0cd6dcb4f044126ebbdc9 (diff)
downloadorg.eclipse.osee-269470b46196c790af7e566d01171d503298e223.tar.gz
org.eclipse.osee-269470b46196c790af7e566d01171d503298e223.tar.xz
org.eclipse.osee-269470b46196c790af7e566d01171d503298e223.zip
feature[ats_TW6661]: Allow anyone to transition from completed or cancelled states
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
index af5ce99ced..9a0e23ec65 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
@@ -161,8 +161,9 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
boolean stateIsEditable = WorkflowManagerCore.isEditable(workItem, workItem.getStateDefinition(),
helper.isPrivilegedEditEnabled(), helper.getTransitionUser(),
userService.isAtsAdmin(helper.getTransitionUser()));
- boolean currentlyUnAssigned =
- workItem.getStateMgr().getAssignees().contains(AtsCoreUsers.UNASSIGNED_USER);
+ boolean currentlyUnAssignedOrCompletedOrCancelled =
+ workItem.isCompletedOrCancelled() || workItem.getStateMgr().getAssignees().contains(
+ AtsCoreUsers.UNASSIGNED_USER);
workItem.getStateMgr().validateNoBootstrapUser();
// Allow anyone to transition any task to completed/cancelled/working if parent is working
if (workItem.isTask() && workItem.getParentTeamWorkflow().getStateMgr().getStateType().isCompletedOrCancelled()) {
@@ -170,7 +171,7 @@ public class TransitionManager implements IAtsTransitionManager, IExecuteListene
continue;
}
// Else, only allow transition if...
- else if (workItem.isInWork() && !workItem.isTask() && !stateIsEditable && !currentlyUnAssigned && !overrideAssigneeCheck) {
+ else if (!workItem.isTask() && !stateIsEditable && !currentlyUnAssignedOrCompletedOrCancelled && !overrideAssigneeCheck) {
results.addResult(workItem, TransitionResult.MUST_BE_ASSIGNED);
continue;
}

Back to the top