jenkins-bot has submitted this change and it was merged.
Change subject: wire 'cancel' in to another spot [redux]
......................................................................
wire 'cancel' in to another spot [redux]
Change-Id: I6cd5799a200599f90135d6b71080b9871fe73469
---
M sites/all/modules/wmf_audit/BaseAuditProcessor.php
1 file changed, 12 insertions(+), 4 deletions(-)
Approvals:
Ejegg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/sites/all/modules/wmf_audit/BaseAuditProcessor.php
b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
index d457409..af04821 100644
--- a/sites/all/modules/wmf_audit/BaseAuditProcessor.php
+++ b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
@@ -424,9 +424,13 @@
}
wmf_audit_echo( 'X' );
} else {
- //@TODO: Some version of makemissing
should make these, too. Gar.
-
$remaining['negative'][$this->get_record_human_date( $record )][] = $record;
- wmf_audit_echo( '.' );
+ // Ignore cancels with no parents
because they must have
+ // been cancelled before reaching Civi.
+ if ( ! $this->record_is_cancel( $record
) ) {
+ //@TODO: Some version of
makemissing should make these, too. Gar.
+
$remaining['negative'][$this->get_record_human_date( $record )][] = $record;
+ wmf_audit_echo( '.' );
+ }
}
}
wmf_audit_echo( "Processed $neg_count 'negative'
transactions\n" );
@@ -983,7 +987,11 @@
'recurring' => array(),
);
foreach ( $transactions as $transaction ) {
- if ( $this->record_is_refund( $transaction ) ||
$this->record_is_chargeback( $transaction ) ) { //negative
+ if (
+ $this->record_is_refund( $transaction ) ||
+ $this->record_is_chargeback( $transaction ) ||
+ $this->record_is_cancel( $transaction )
+ ) { //negative
if (
$this->negative_transaction_exists_in_civi( $transaction ) === false ) {
wmf_audit_echo( '-' ); //add a
subtraction. I am the helpfulest comment ever.
$missing['negative'][] = $transaction;
--
To view, visit https://gerrit.wikimedia.org/r/286514
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6cd5799a200599f90135d6b71080b9871fe73469
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits