From 221614de0b80a5aa7fa831ea742be11d3e67485b Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Fri, 19 May 2017 15:20:27 -0400 Subject: [PATCH] CRM-20607 - Dedupe - Allow saving reserved groups --- CRM/Contact/Form/DedupeRules.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php index 82e2faf15a..ebfde46b91 100644 --- a/CRM/Contact/Form/DedupeRules.php +++ b/CRM/Contact/Form/DedupeRules.php @@ -156,7 +156,11 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form { } } if (empty($fields['threshold'])) { - $errors['threshold'] = ts('Threshold weight cannot be empty or zero.'); + // CRM-20607 - Don't validate the threshold of hard-coded rules + if (!(CRM_Utils_Array::value('is_reserved', $fields) && + CRM_Utils_File::isIncludable("CRM/Dedupe/BAO/QueryBuilder/{$self->_defaultValues['name']}.php"))) { + $errors['threshold'] = ts('Threshold weight cannot be empty or zero.'); + } } if (!$fieldSelected) { -- 2.25.1