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

fix email receipt flag for recurring record #19299

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Reviewer's commit of #19210

@civibot
Copy link

civibot bot commented Dec 31, 2020

(Standard links)

@yashodha
Copy link
Contributor

yashodha commented Jan 1, 2021

@eileenmcnaughton

are the failing tests related?

@eileenmcnaughton
Copy link
Contributor Author

@yashodha the 2 membership tests were a once-a-year-bug in the tests I think (also affect the other runs). the other is in the new test but didn't fail locally & could also be a new-years's bug. I've pushed up a cleanup patch which will trigger the tests to run again so we can see

@demeritcowboy
Copy link
Contributor

jenkins test this please

@eileenmcnaughton
Copy link
Contributor Author

test this please

@sunilpawar
Copy link
Contributor

@eileenmcnaughton

CRM_Contribute_BAO_ContributionRecurTest::testContributionEmailReceipt
ERROR USERINFO: INSERT INTO civicrm_contribution_recur (contact_id , amount , currency , frequency_unit , frequency_interval , installments , start_date , create_date , modified_date , end_date , processor_id , contribution_status_id , is_test , cycle_day , next_sched_contribution_date , failure_count , auto_renew , payment_processor_id , financial_type_id , payment_instrument_id ) VALUES ( 46 , 3 , 'USD' , 'week' , 1 , 2 , 0 , 0 , 0 , 0 , '643411460836' , 1 , 0 , 1 , 0 , 0 , 0 , 1 , 1 , 1 ) [nativecode=1292 ** Incorrect datetime value: '0' for column 'start_date' at row 1]

@eileenmcnaughton
Copy link
Contributor Author

@sunilpawar does it fail there locally for you? It didn't for me yesterday - I'm wondering if there is a mysql config in play (@demeritcowboy does this seem familiar?)


// pass null value to is_email_receipt
$createParams['is_email_receipt'] = NULL;
$recurring1 = CRM_Contribute_BAO_ContributionRecur::add($createParams);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the test failure is just that the add() function doesn't take this type of params. The params format seems intended for the api which converts relative dates like 'yesterday' into actual dates. If you give that to add() then it tries to literally insert 'yesterday' into a date field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok - I fixed it up to call the api - hopefully it passes now

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.

5 participants