dev/core#530 CiviCase: using label instead of name to be consistent and commenting why
authorAlice Frumin <alice@aghstrategies.com>
Wed, 8 May 2019 14:42:20 +0000 (10:42 -0400)
committerAlice Frumin <alice@aghtrategies.com>
Mon, 10 Jun 2019 15:26:09 +0000 (11:26 -0400)
ang/crmCaseType.js

index 899ad35abf7eff9f00ebf2902ae9a911b626821d..4dc077a37b77625497f1ea9456ad5c32e1365f7a 100644 (file)
             });
           }
         }
+        // TODO The ids below really should use names not labels see
+        //  https://lab.civicrm.org/dev/core/issues/774
         else {
           result.push({
             text: relType.label_b_a,
-            id: relType.name_a_b
+            id: relType.label_a_b
           });
 
           if (!isBidirectionalRelationship) {
             result.push({
               text: relType.label_a_b,
-              id: relType.name_b_a
+              id: relType.label_b_a
             });
           }
         }
       activity.default_assignee_contact = null;
     };
 
+    // TODO roleName passed to addRole is a misnomer, its passed as the
+    // label HOWEVER it should be saved to xml as the name see
+    // https://lab.civicrm.org/dev/core/issues/774
+
     /// Add a new role
     $scope.addRole = function(roles, roleName) {
       var names = _.pluck($scope.caseType.definition.caseRoles, 'name');