Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2017-08-01 11:31:24 -0400
committermegumi.telles2017-08-02 09:57:30 -0400
commit1b9d4cfe87e46c49b1fc4e80f5822ca4edde6267 (patch)
treec132cbea80381d881e29af720167d0b4adea7057
parent09d701d2d1fedd121fab89977b0daeb0d3dacc19 (diff)
downloadorg.eclipse.osee-ci_dispo.tar.gz
org.eclipse.osee-ci_dispo.tar.xz
org.eclipse.osee-ci_dispo.zip
feature: Add support for mass send dispo statusci_dispo
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java15
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java2
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js43
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html22
5 files changed, 82 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
index aeea6fd40a..67c224936f 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
@@ -45,6 +45,7 @@ public class DispoStrings {
public static final String Item_InComplete = "INCOMPLETE";
public static final String Operation_Import = "Import";
+ public static final String Operation_MassSendStatus = "MassSendDispoItemStatus";
public static final String DeletedDiscrepancy = "Deleted Discrepancy";
@@ -52,4 +53,5 @@ public class DispoStrings {
public static final String Test_Unit_Resolution = "Test_Script";
public static final String Exception_Handling_Resolution = "Exception_Handling";
+
}
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 664c5afef2..69407f50cc 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
@@ -455,6 +455,8 @@ public class DispoApiImpl implements DispoApi {
} catch (Exception ex) {
throw new OseeCoreException(ex);
}
+ } else if (operation.equals(DispoStrings.Operation_MassSendStatus)) {
+ MassSendDispoItemStatus(branch, setToEdit);
}
// Create the Note to document the Operation
@@ -466,6 +468,19 @@ public class DispoApiImpl implements DispoApi {
getWriter().updateOperationSummary(author, branch, setToEdit.getGuid(), report);
}
+ private void MassSendDispoItemStatus(BranchId branch, DispoSet set) {
+ try {
+ HashMap<String, DispoItem> nameToItemMap = getItemsMap(branch, set);
+ Collection<String> ids = new ArrayList<>();
+ for (DispoItem item : nameToItemMap.values()) {
+ ids.add(item.getGuid());
+ }
+ updateBroadcaster.broadcastUpdateItems(ids, nameToItemMap.values(), set);
+ } catch (Exception ex) {
+ throw new OseeCoreException(ex);
+ }
+ }
+
private HashMap<String, DispoItem> getItemsMap(BranchId branch, DispoSet set) {
HashMap<String, DispoItem> toReturn = new HashMap<>();
List<DispoItem> dispoItems = getDispoItems(branch, set.getGuid());
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java
index 483f725b77..09d1558ca6 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java
@@ -217,7 +217,7 @@ public class DispoSetCopier {
Map<String, Discrepancy> sourceDiscrepancies = sourceItem.getDiscrepanciesList();
for (String id : idsOfCoveredDiscrepancies) {
Discrepancy coveredDiscrepancy = sourceDiscrepancies.get(id);
- if (!destDescrepanciesTextOnly.contains(coveredDiscrepancy.getText())) {
+ if (coveredDiscrepancy == null || !destDescrepanciesTextOnly.contains(coveredDiscrepancy.getText())) {
return false;
}
}
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
index 775e7676f3..375fad1ea3 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
@@ -344,6 +344,16 @@ app.controller('adminController', [
};
+ $scope.massSendDispoItemStatus = function massSendDispoItemStatus (set) {
+ var newSet = $scope.getSetById(set.ciDispositionSet);
+ newSet.operation = "MassSendDispoItemStatus";
+ Set.update({
+ programId: $scope.programSelection,
+ setId: set.ciDispositionSet
+ }, newSet);
+ };
+
+
// -------------------- Summary Grids ----------------------\\
var filterBarPlugin = {
init: function(scope, grid) {
@@ -699,5 +709,38 @@ app.controller('adminController', [
$modalInstance.dismiss('cancel');
};
}
+
+ // Mass Send Disposition Item Status
+ $scope.openMassSendDispoItemStatusModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'massSendDispoItemStatus.html',
+ controller: MassSendDispoItemStatusCtrl,
+ size: 'sm',
+ windowClass: 'MassSendDispoItemStatusModal',
+ resolve: {
+ sets: function() {
+ return $scope.sets;
+ }
+ }
+ });
+
+ modalInstance.result.then(function(inputs) {
+ $scope.massSendDispoItemStatus(inputs);
+ });
+ }
+
+ var MassSendDispoItemStatusCtrl = function($scope, $modalInstance, sets) {
+ $scope.ciDispositionSet = "";
+ $scope.setsLocal = angular.copy(sets);
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.ciDispositionSet = this.dispositionSet;
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ }
}
]); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
index 7fe302d97f..0d10da4dde 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
@@ -51,6 +51,7 @@
<button ng-disabled="isRunningOperation" ng-click="openCopySetModal()" ng-show="sets.length > 0" class="btn btn-primary" id=generateReportBtn>Merge Annotations</button>
<button ng-disabled="isRunningOperation" ng-click="openMassAssignTeamModal()" ng-show="sets.length > 0" class="btn btn-primary" id=generateReportBtn>Mass Assign Team</button>
<button ng-disabled="isRunningOperation" ng-click="openConfigureCiSetModal()" ng-show="sets.length > 0" class="btn btn-primary" id=generateReportBtn>Configure CI Set</button>
+ <button ng-disabled="isRunningOperation" ng-click="openMassSendDispoItemStatusModal()" ng-show="sets.length > 0" class="btn btn-primary" id=generateReportBtn>Mass Send Dispo Item Status</button>
</div>
</div>
</div>
@@ -201,7 +202,7 @@
</script>
- <script type="text/ng-template" id="configureCiSet.html">
+ <script type="text/ng-template" id="configureCiSet.html">
<div class="modal-header">
<h3 class="modal-title">Add CI Set</h3>
</div>
@@ -222,6 +223,25 @@
</div>
</script>
+
+ <script type="text/ng-template" id="massSendDispoItemStatus.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Mass Send Disposition Items Status</h3>
+ </div>
+ <div class="modal-body" overflow: auto;">
+ <div class="form-group">
+ Select Disposition Set
+ <select class="form-control" ng-model="dispositionSet" ng-options="obj.guid as obj.name for obj in setsLocal">
+ </select>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+
+ </script>
+
</body>
</html>

Back to the top