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

Deprecate generating recipients from MailingJob #13627

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 17, 2019

Overview

Deprecate generating recipients from MailingJob

Before

No deprecation notice when calling MailingJob::create with mailing_id (which results in the recipient list being generated, and is the reason this function is generally bypassed)

After

Deprecation notice

Technical Details

Every place in the code that would sensibly call this BAO / api create function ...
doesn't - presumably because it does something generally done elsewhere.

Deprecating it will enable us to remove it later & allow this create fn & associated
hooks to be called

generating the list when not required causes deep performance badness

Comments

Am expecting syntaxconformance fails - assuming 'mailing_id' gets through from there - will address as they arise

#12231

Every place in the code that would sensibly call this BAO / api create function ...
doesn't - presumably because it does something generally done elsewhere.

Deprecating it will enable us to remove it later & allow this create fn & associated
hooks to be called
@civibot
Copy link

civibot bot commented Feb 17, 2019

(Standard links)

@civibot civibot bot added the master label Feb 17, 2019
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Feb 18, 2019
Passes in scheduled_date (as the 'real' api call would)

Part of this attempted deprecation civicrm#13627
@eileenmcnaughton
Copy link
Contributor Author

test this please

@monishdeb
Copy link
Member

@eileenmcnaughton seems like you have not included the UT fix?

@eileenmcnaughton
Copy link
Contributor Author

@monishdeb I started on them - got a change merged that fixed one of them

@eileenmcnaughton
Copy link
Contributor Author

This is kinda the meaty one

api_v3_MailingTest::testMailerSendTest_email
Failure in api call for Mailing send_test:  Deprecated function CRM_Mailing_BAO_MailingJob::create, use call getRecipients from calling function.
Array
(
    [civi.tag] => deprecated
)

In that it's the one place I think the send-from-create-job is used but I think calling the send from sendtest makes sense here

@eileenmcnaughton eileenmcnaughton deleted the mailing_create_deprecate branch June 23, 2019 21:34
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