jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398779 )

Change subject: Top out risk score at 100 million.
......................................................................


Top out risk score at 100 million.

100 million is effectively 'infinite risk' & the DB breaks somewhere above that 
point

Bug: T183102

Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Eileen: Looks good to me, approved



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 4dd223d..47de8e4 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -136,6 +136,11 @@
       if (array_key_exists('mysql_type', $definition) && 
$definition['mysql_type'] === 'DATETIME') {
         $msg[$field] = wmf_common_date_unix_to_sql($msg[$field]);
       }
+      // e.g. 3.5848273556811E+38 breaks the db - use 100 mill as 'infinitely 
dubious'
+      if (!empty($msg['risk_score']) && $msg['risk_score'] > 100000000) {
+        $msg['risk_score'] = 100000000;
+      }
+
       $data[$field] = $msg[$field];
     }
   }

-- 
To view, visit https://gerrit.wikimedia.org/r/398779
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to