"Khorn (WMF)" changed the status of Wikimedia.r1475 to "fixme" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/Wikimedia/1475#c32500
Old Status: new
New Status: fixme
Commit summary for Wikimedia.r1475:
Adding the ability for queue2civicrm to process recurring payments from
ActiveMQ. Including civicrm_recurring_globalcollect_common.inc for the method
_civicrm_recurring_globalcollect_get_next_sched_contribution_date_for_month().
Added the methods: _queue2civicrm_contribution_recur_insert() and
_queue2civicrm_update_contribution_for_recurring().
Khorn (WMF)'s comment:
<pre>drush_set_error('CONTRIBUTION', 'The contribution_record, with the
contact_id [' . $contact_id . '] is empty: ' . print_r( $msg, true ));</pre>
The line itself is fine, but it spawns two related fixmes:
<ul>
<li>'CONTRIBUTION' does not exist in the severity array passed in to
_queue2civicrm_get_top_new_drush_error, from queue2civicrm_dequeue. All drush
errors you set in queue2civi need to be represented in that array, in
appropriate severity order from high to low. Anything you add also needs an
entry in the switch statement in queue2civi's dequeue function, or it won't
know what to do when one happens.</li>
<li>You should either set finely-tuned drush errors just before you return
false everywhere in this function, or set it on the outside whenever the whole
thing comes back false. Either way, every time you fail to be able to take the
expected next action in queue2civicrm, you need to set a drush error so it can
be handled appropriately. Currently, you are returning false for a failure in 6
hard-coded places, and one conditional place. You only set the drush error in
one. All false cases need to be covered either inside
_queue2civicrm_contribution_recur_insert, or in a more generic way one time by
the calling function.</li>
</ul>
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview