Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 1 of 2 remaining places where relatedObjects is called in completeOrder #18257

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor cleanup - removes lines that are doing anything

Before

More cruft

After

Less

Technical Details

If we remove this & the other place we no longer need to call loadRelatedObjects before this
function and only message related places call it

In this case the lines can go as

  1. trxn_id should always be used if provided. Casting to isoDate has not been required for a few
    years as the DAO now handles

Comments

@civibot
Copy link

civibot bot commented Aug 25, 2020

(Standard links)

@civibot civibot bot added the master label Aug 25, 2020
@eileenmcnaughton eileenmcnaughton changed the title Remove 1 or 2 remaining places where relatedObjects is called in completeOrder Remove 1 of 2 remaining places where relatedObjects is called in completeOrder Aug 26, 2020
$contribution->trxn_id = $input['trxn_id'] ?? NULL;
$contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
}
$contribution->trxn_id = $input['trxn_id'] ?? NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton This line can go too - we don't pass $contribution by reference anymore and the only place it's passed is later in this function to CRM_Activity_BAO_Activity::addActivity which doesn't use trxn_id.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep agree - I've removed it. CRM_Activity_BAO_Activity::addActivity requires a lot of our remaining vars

@mattwire
Copy link
Contributor

@eileenmcnaughton Agree - can you see if you come to the same conclusion about the trxn_id line?

…leteOrder

If we remove this & the other place we no longer need to call loadRelatedObjects before this
function and only message related places call it

In this case the lines can go as

1) trxn_id should always be used if provided. Casting to isoDate has not been required for a few
years as the DAO now handles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants