Merge pull request #15421 from artfulrobot/queue-safety
[civicrm-core.git] / ang / crmCaseType.js
index daee538ae4c1ef90b7d893b7628bdc8da8ab2bd7..af7958e344366745f4bf1d7f30f35f423b0d4a90 100644 (file)
     $scope.addRoleOnTheFly = function(roles, newType) {
       roles.push({name: newType.label_b_a, displaylabel: newType.label_a_b});
       // Assume that the case role should be A-B but add both directions as options.
-      $scope.relationshipTypeOptions.push({id: newType.label_a_b, text: newType.label_a_b});
+      $scope.relationshipTypeOptions.push({id: newType.label_a_b, text: newType.label_b_a});
       if (newType.label_a_b != newType.label_b_a) {
-        $scope.relationshipTypeOptions.push({id: newType.label_b_a, text: newType.label_b_a});
+        $scope.relationshipTypeOptions.push({id: newType.label_b_a, text: newType.label_a_b});
       }
     };