From 12b84ade23c996868d89facc1d0cc3ece158774f Mon Sep 17 00:00:00 2001 From: Camilo Rodriguez Date: Thu, 26 Oct 2017 17:48:08 +0000 Subject: [PATCH] CRM-21360: Make 'Open Case' Activity Optional Removed conditionals that made 'Open Case' activity on standard timeline mandatory on Case Type create and edit views. Also added a label to default Reference value so users can choose '-- Case Start --' as reference for offsets. --- ang/crmCaseType.js | 6 +----- ang/crmCaseType/timelineTable.html | 10 ++++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ang/crmCaseType.js b/ang/crmCaseType.js index 66ca2b1594..e3b4a16c6a 100644 --- a/ang/crmCaseType.js +++ b/ang/crmCaseType.js @@ -288,11 +288,7 @@ }; $scope.isActivityRemovable = function(activitySet, activity) { - if (activitySet.name == 'standard_timeline' && activity.name == 'Open Case') { - return false; - } else { - return true; - } + return true; }; $scope.isValidName = function(name) { diff --git a/ang/crmCaseType/timelineTable.html b/ang/crmCaseType/timelineTable.html index 5014c79946..15a0f935b1 100644 --- a/ang/crmCaseType/timelineTable.html +++ b/ang/crmCaseType/timelineTable.html @@ -40,9 +40,9 @@ Required vars: activitySet ui-options="{dropdownAutoWidth : true}" ng-model="activity.reference_activity" ng-options="activityType.name as activityType.label for activityType in activitySet.activityTypes" - ng-hide="activity.name == 'Open Case'" - ng-required="activity.name != 'Open Case'" + ng-required="activity.name != ''" > + @@ -51,8 +51,7 @@ Required vars: activitySet type="text" ng-pattern="/^-?[0-9]*$/" ng-model="activity.reference_offset" - ng-hide="activity.name == 'Open Case'" - ng-required="activity.name != 'Open Case'" + ng-required="activity.name != ''" > @@ -61,8 +60,7 @@ Required vars: activitySet ui-options="{dropdownAutoWidth : true}" ng-model="activity.reference_select" ng-options="key as value for (key,value) in {newest: ts('Newest'), oldest: ts('Oldest')}" - ng-hide="activity.name == 'Open Case'" - ng-required="activity.name != 'Open Case'" + ng-required="activity.name != ''" > -- 2.25.1