Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Eileenmcnaughton | T356115 Turn our wmf donation $msg into a class | |||
Resolved | Eileenmcnaughton | T357469 Move all our queue consumers into the extension space | |||
Resolved | Eileenmcnaughton | T357470 replace our drush scripts with WMFQueue.consume api | |||
Resolved | Eileenmcnaughton | T357471 Consolidate rest of normalize into WMFMessage class | |||
Resolved | Eileenmcnaughton | T363524 Remove unused import code from main codebase |
Event Timeline
Change 1003554 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Update recurring Queue consumer to instantiate recurring message directly
Change 1003555 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Extract getFinancialTypeID() in message class
Change 1003560 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move get subscriber ID to child message class
Change 1003554 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Update recurring Queue consumer to instantiate recurring message directly
Change 1003555 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Extract getFinancialTypeID() in message class
Change 1003560 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move get subscriber ID to child message class
Change 1004790 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move validation to RecurMessage class
Change 1004791 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move getContributionRecurID to Message class
Change 1004795 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Switch test to use api rather than overloaded function
Change 1004796 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move contribution_tracking_id lookup to Recurring Message
Change 1004797 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move 2 line function back into caller
Change 1004797 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move 2 line function back into caller
Change 1004790 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move validation to RecurMessage class
Change 1005181 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Extract getConversionRate
Change 1005182 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move converstion rate handling to getters
Change 1005183 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Simplify setting of amounts
Change 1005184 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Simplify early return check on money
Change 1005185 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Fold the amount wrangling back into the parent
Change 1005198 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move function called from one class to that class
Change 1005198 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move function called from one class to that class
Change 1005181 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Extract getConversionRate
Change 1005182 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move converstion rate handling to getters
Change 1005183 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Simplify setting of amounts
Change 1007365 had a related patch set uploaded (by Ejegg; author: Ejegg):
[wikimedia/fundraising/crm@master] Use getter for currency in exception message
Change 1005184 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Simplify early return check on money
Change 1005185 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Fold the amount wrangling back into the parent
Change 1007365 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Use getter for currency in exception message
Change 1004795 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Switch test to use api rather than overloaded function
Change 1004791 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move getContributionRecurID to Message class
Change 1008946 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move function back to only caller
Change 1009596 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Was it just a good idea at the time?
Change 1009596 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Was it just a good idea at the time?
If anyone has headspace I'm looking at decommisioning wmf_civicrm_verify_message_and_stage (which would mean moving a cut down version back into each of the 2 callers)
It is called from 2 places
- wmf_civicrm_contribution_message_import
- UPIQueueConsumer::insertContributionRecur()
I think I can get the function down to 3 lines (which is small enough to move back)
$msg = $message->normalize(); $message->validate(); $msg = wmf_civicrm_add_contribution_tracking_if_missing($msg);
(one of the callers already calls $message->validate();)
The question really is about the $message->validate()
The current validate checks are
- are gross, currency, gateway_txn_id & gateway present
- is gross > 0 (ditto net if present)
- is it a duplicate message
I could move all that to the DonationMessage::validate() & have RecurDonationMessage::validate() include parent::validate()
The question then is whether everywhere currently calling RecurDonationMessage::validate() is OK with those checks being done - which really means adding them into RecurringQueueConsumer::normalizeMessage since the other place that calls $message->validate(); already calls this normalize flow
If that IS OK it does beg the question as to why this Adam-esque logging happens
// just... don't \Civi::log('wmf')->info('wmf_civicrm: Not freaking out about non-monetary message.');
Change 1008946 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Move function back to only caller
Change 1011181 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Return handling for tags & groups to import classes
I think we might have tugged on the thread for long enough from this end for now - I think once these ones are reviewed it might be better to focus on a different end
Change 1012606 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Move validation of required fields, duplicates onto the message
Change #1011181 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Return handling for tags & groups to import classes
Change #1012606 merged by Eileen:
[wikimedia/fundraising/crm@master] Move validation of required fields, duplicates onto the message
Change #1023564 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Clean up handling of fiscal_number / legal_identifier
Change #1025472 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Update OptInQueueConsuer to use a Message class, apiv4
this one is the one currently needing review https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/1022309
Change #1023564 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Clean up handling of fiscal_number / legal_identifier
Change #1025472 merged by Ejegg:
[wikimedia/fundraising/crm@master] Update OptInQueueConsuer to use a Message class, apiv4
Change #1004796 abandoned by Eileen:
[wikimedia/fundraising/crm@master] Move contribution_tracking_id lookup to Recurring Message
Reason:
Change #1032878 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] More follow on clean up - remove contact_id variable
This one is as long as a piece of string & there is def more that could be done but I think maybe under another phab
Change #1032878 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] More follow on clean up - remove contact_id variable