Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2016-02-17 19:08:59 -0500
committerRyan D. Brooks2016-02-17 19:08:59 -0500
commit2844b0f3e488ec05e6e8eaaa92dee1ddae3c8896 (patch)
treebab201e1f2d2d6a9bacc94d8b37e463679ac4fd6 /plugins/org.eclipse.osee.web.ui
parent9ea9f2589d0cda05d1d54e00334ea398760d3d48 (diff)
downloadorg.eclipse.osee-2844b0f3e488ec05e6e8eaaa92dee1ddae3c8896.tar.gz
org.eclipse.osee-2844b0f3e488ec05e6e8eaaa92dee1ddae3c8896.tar.xz
org.eclipse.osee-2844b0f3e488ec05e6e8eaaa92dee1ddae3c8896.zip
feature[ats_ATS273456]: Allow Dispo to copy sets across Programs
Diffstat (limited to 'plugins/org.eclipse.osee.web.ui')
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js35
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html5
2 files changed, 37 insertions, 3 deletions
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 239125ec4f..2e72cf0e15 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
@@ -161,7 +161,7 @@
var loadingModal = $scope.showLoadingModal();
$scope.loading = true;
$scope.items = {};
- Set.query({
+ Set.query({
programId: $scope.programSelection,
type: $rootScope.type
}, function(data) {
@@ -250,10 +250,12 @@
copySetOp.categoryParam = inputs.categoryParam;
copySetOp.assigneeParam = inputs.assigneeParam;
copySetOp.noteParam = inputs.noteParam;
+ copySetOp.sourceProgram = inputs.sourceProgram;
copySetOp.$save({
programId: $scope.programSelection,
destinationSet: inputs.destinationSet,
+ sourceProgram: inputs.sourceProgram,
sourceSet: inputs.sourceSet,
}, function(data) {
$scope.isCopying = false;
@@ -332,6 +334,15 @@
resolve: {
sets: function() {
return $scope.sets;
+ },
+ programs: function() {
+ return $scope.programs;
+ },
+ showLoadingModal: function() {
+ return $scope.showLoadingModal;
+ },
+ currentlySelectedProgram: function() {
+ return $scope.programSelection;
}
}
});
@@ -342,8 +353,27 @@
}
- var CopySetModalCtrl = function($scope, $modalInstance, sets) {
+ var CopySetModalCtrl = function($scope, $modalInstance, programs, currentlySelectedProgram, sets, showLoadingModal) {
$scope.setsLocal = angular.copy(sets);
+ $scope.programsLocal = angular.copy(programs);
+ $scope.setsLocalSource = angular.copy(sets);
+ $scope.sourceProgram = currentlySelectedProgram;
+
+ $scope.updateProgramLocal = function() {
+ var loadingModal = showLoadingModal();
+ $scope.loading = true;
+ Set.query({
+ programId: $scope.sourceProgram,
+ type: $rootScope.type
+ }, function(data) {
+ loadingModal.close();
+ $scope.setsLocalSource = data;
+ }, function(data) {
+ loadingModal.close();
+ alert(data.statusText);
+ });
+ };
+
$scope.annotationOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}];
$scope.categoryOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS EMPTY'}, { value: 3, text: 'MERGE DEST AND SOURCE'}];
$scope.assigneeOptions = [{ value: 0, text: 'NONE'}, { value: 1, text: 'OVERRIDE'}, { value: 2, text: 'ONLY COPY IF DEST IS UNASSIGNED'}];
@@ -357,6 +387,7 @@
$scope.ok = function() {
var inputs = {};
inputs.destinationSet = this.destinationSet;
+ inputs.sourceProgram = this.sourceProgram;
inputs.sourceSet = this.sourceSet;
inputs.annotationParam = this.annotationParam;
inputs.categoryParam = this.categoryParam;
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 47446c9fb1..320dce2974 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
@@ -80,8 +80,11 @@
</select>
</div>
<div class="form-group">
+ Select Source Program
+ <select class="form-control" ng-change="updateProgramLocal()" ng-model="sourceProgram" ng-options="obj.value as obj.text for obj in programsLocal">
+ </select>
Select Source Set
- <select class="form-control" ng-model="sourceSet" ng-options="obj.guid as obj.name for obj in setsLocal">
+ <select class="form-control" ng-model="sourceSet" ng-options="obj.guid as obj.name for obj in setsLocalSource">
</select>
</div>

Back to the top