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

Move a little code from legacy function loadRelatedObjects to the calling functions #24190

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

loadRelatedObjects is a function we have been trying to decommission since the GFC. I'm pretty close to removing the call from the invoice task (which would leave two) but it interacts with _component in weird ways - moving that interaction out of loadRelatedObjects & into the three places that call it creates opportunities for futher code cleanup

Before

The chunk of code that sets _component based on the input is in loadRelatedObjects

After

It is moved to the three calling functions. Two out of the three already call find() so I moved that line to the one that doesn't (or at least on a quick skim didn't appear to - I can look at the functions separately in more depth as we remove their shared dependencies

Technical Details

@mattwire - another baby step - once we get rid of loadRelatedObjects out of the Invoice task it will just remain in transitioncomponents (itself on the hit list) and sendConfirmation

Comments

@civibot
Copy link

civibot bot commented Aug 9, 2022

(Standard links)

@civibot civibot bot added the master label Aug 9, 2022
@mattwire mattwire merged commit 55d3832 into civicrm:master Aug 10, 2022
@eileenmcnaughton eileenmcnaughton deleted the load_related branch August 10, 2022 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants