rename local variable
authorDemeritCowboy <demeritcowboy@hotmail.com>
Wed, 2 Oct 2019 19:42:34 +0000 (15:42 -0400)
committerDemeritCowboy <demeritcowboy@hotmail.com>
Wed, 2 Oct 2019 19:49:42 +0000 (15:49 -0400)
ang/crmCaseType.js

index f140712ea46b234aa7c92fde868be7ee842f3b74..64f2d5cbcdd737454375fd00f2a59c3fd083ae00 100644 (file)
 
       // go lookup and add client-perspective labels for $scope.caseType.definition.caseRoles
       _.each($scope.caseType.definition.caseRoles, function (set) {
-        _.each($scope.relationshipTypeOptions, function (relTypes) {
-          if (relTypes.text == set.name) {
-            set.displaylabel = relTypes.id;
+        _.each($scope.relationshipTypeOptions, function (relationshipTypeOption) {
+          if (relationshipTypeOption.text == set.name) {
+            // relationshipTypeOption.id here corresponds to one of the civicrm_relationship_type.label database fields, not civicrm_relationship_type.id
+            set.displaylabel = relationshipTypeOption.id;
           }
         });
       });