Commit 1e921db0 authored by René Olivo's avatar René Olivo

Fixes the following issues with case type management:

* When selecting default assignees by relationships, it will only display active relationship types.
* It also handles activity types that have been deleted. Without taking this into consideration,
the screen would break if it encounters a missing activity type.
parent 9c13ddf2
......@@ -76,6 +76,7 @@
}];
reqs.relTypes = ['RelationshipType', 'get', {
sequential: 1,
is_active: 1,
options: {
sort: CRM.crmCaseType.REL_TYPE_CNAME,
limit: 0
......@@ -315,7 +316,8 @@
_.each($scope.caseType.definition.activitySets, function (set) {
_.each(set.activityTypes, function (type, name) {
var isDefaultAssigneeTypeUndefined = _.isUndefined(type.default_assignee_type);
type.label = $scope.activityTypes[type.name].label;
var typeDefinition = $scope.activityTypes[type.name];
type.label = (typeDefinition && typeDefinition.label) || type.name;
if (isDefaultAssigneeTypeUndefined) {
type.default_assignee_type = defaultAssigneeDefaultValue.value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment