From 259a765258c3933a4116eb2dbf215e515628cc74 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 21 Aug 2014 14:21:10 -0700 Subject: [PATCH] CRM-15166 - crmCaseType/timelineTable.html - Don't allow removal of the standard timeline's "Open Case". Note: If (for some bizarre/erroneous reason) an admin added the "Open Case" activity to another timeline, then it would be reasonable to delete it. --- js/angular-crmCaseType.js | 8 ++++++++ partials/crmCaseType/timelineTable.html | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index 78847f6bcf..bc329bcd5b 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -232,6 +232,14 @@ } }; + $scope.isActivityRemovable = function(activitySet, activity) { + if (activitySet.name == 'standard_timeline' && activity.name == 'Open Case') { + return false; + } else { + return true; + } + }; + $scope.isValidName = function(name) { return !name || name.match(/^[a-zA-Z0-9_]+$/); }; diff --git a/partials/crmCaseType/timelineTable.html b/partials/crmCaseType/timelineTable.html index 621b9da12b..824629527f 100644 --- a/partials/crmCaseType/timelineTable.html +++ b/partials/crmCaseType/timelineTable.html @@ -63,7 +63,9 @@ Required vars: activitySet - + -- 2.25.1