Skip to content

Commit

Permalink
Merge pull request #10383 from MegaphoneJon/unsupervised-reserved-thr…
Browse files Browse the repository at this point in the history
…eshold

CRM-20607 - Dedupe - Allow saving reserved groups
  • Loading branch information
colemanw authored Jul 29, 2017
2 parents 5d5fd57 + 221614d commit ddcf8c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CRM/Contact/Form/DedupeRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ public static function formRule($fields, $files, $self) {
}
}
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) {
Expand Down

0 comments on commit ddcf8c7

Please sign in to comment.