From cd2c9605ce23be865f91f8a9193ec5572bb5458d Mon Sep 17 00:00:00 2001
From: Alice Frumin <alice@aghstrategies.com>
Date: Wed, 8 May 2019 10:42:20 -0400
Subject: [PATCH] dev/core#530 CiviCase: using label instead of name to be
 consistent and commenting why

---
 ang/crmCaseType.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ang/crmCaseType.js b/ang/crmCaseType.js
index 899ad35abf7..4dc077a37b7 100644
--- a/ang/crmCaseType.js
+++ b/ang/crmCaseType.js
@@ -297,16 +297,18 @@
             });
           }
         }
+        // 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
             });
           }
         }
@@ -455,6 +457,10 @@
       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');
-- 
GitLab