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

CRM-20955 - Allow contact's second membership to inherit when created… #10745

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

davejenx
Copy link
Contributor

… in back end using price set.

@KarinG
Copy link
Contributor

KarinG commented Jul 24, 2017

We have had the 4.6 equivalent of this patch in production for months now - and it solved a lot of issues.

@davejenx
Copy link
Contributor Author

This is the 4.7 equivalent of #9520 .

Note that this issue masks Contribution deleted when relationship deleted, incorrect line items & membership_payments for second inherited membership created in back end via price set so fixing this issue, allowing inheritance to work, paves the way for that issue to occur. I've submitted PRs #10759 (4.7) & #10760 (4.6) for that.

@monishdeb
Copy link
Member

@davejenx is there any unit test coverage for this fix?

@davejenx
Copy link
Contributor Author

davejenx commented Aug 2, 2017

@monishdeb I haven't written a unit test, I'm not sure how to do that to simulate creating a pair of memberships in the back end using a price set.

@monishdeb
Copy link
Member

@davejenx here is an example https://github.com/civicrm/civicrm-core/pull/10726/files#diff-3cd3f80dd69269a09e1d88996ce92f6fR719 where I have created a price-set that consist of a checkbox price-field and each price-option hold different membership type (id as 15 and 35). In your case you can add similar CRM unit test in tests/phpunit/CRM/Member/Form/MembershipTest.php

Ping me if on Mattermost dev channel (alias - @Monish) if you need help with test setup.

@davejenx
Copy link
Contributor Author

davejenx commented Aug 2, 2017

@monishdeb Great, thanks for that. I'm not able to work on this immediately but would like to get a unit test together. Will let you know how I get on.

@monishdeb
Copy link
Member

monishdeb commented Aug 2, 2017

Cool 😎👍

@lcdservices
Copy link
Contributor

I've tested and confirmed this functionality. Tested in conjunction with PR-10759. Additional testing comments in CRM-20966.

@davejenx
Copy link
Contributor Author

@lcdservices Great, thanks for testing!

@colemanw
Copy link
Member

Better in than out. But @davejenx a followup PR with a test would be most welcome :)

@colemanw colemanw merged commit ead28bc into civicrm:master Aug 23, 2017
@davejenx
Copy link
Contributor Author

@monishdeb @colemanw Follow-up PR with unit tests for this + for CRM-20966 / #10759: #11184.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants