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

APIv4 - Fix output of membershipType auto_renew field #20840

Merged

Conversation

colemanw
Copy link
Member

Overview

Ensure the "auto_renew" field is returned correctly by the MembershipType API.

Before

Returns true/false

After

Returns int

Technical Details

The field had been declared a "boolean" in the schema, which at a SQL level is exactly the same as "tinyint" but it was resulting in incorrect API output.

See #20768 (comment)

@civibot
Copy link

civibot bot commented Jul 13, 2021

(Standard links)

@eileenmcnaughton
Copy link
Contributor

CRM_Member_Form_MembershipRenewalTest.testSubmitRecurCompleteInstantWithMail with data set #0
CRM_Member_Form_MembershipRenewalTest.testSubmitRecurCompleteInstantWithMail with data set #1
CRM_Member_Form_MembershipRenewalTest.testSubmitRecur
CRM_Member_Form_MembershipRenewalTest.testSubmitRecurCompleteInstant
CRM_Member_Form_MembershipTest.testSubmitRecur
CRM_Member_Form_MembershipTest.testSubmitRecurCompleteInstant

@jitendrapurohit
Copy link
Contributor

@colemanw Confirmed that the patch fixes the return value of auto_renew. Thanks for the fix :)

image

Test failures seem mostly like test related? the params are passed as boolean, instead of 0/1/2.

The field had been declared a "boolean" in the schema, which at a SQL level
is exactly the same as "tinyint" but it was resulting in incorrect API output.
@colemanw
Copy link
Member Author

@jitendrapurohit @eileenmcnaughton I've updated the tests. Want to merge-on-pass?

@eileenmcnaughton
Copy link
Contributor

unrelated fail

@eileenmcnaughton eileenmcnaughton merged commit b6601e0 into civicrm:master Jul 15, 2021
@eileenmcnaughton eileenmcnaughton deleted the membershipTypeAutoRenewFix branch July 15, 2021 01:32
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.

3 participants