-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#1599/Deceased Contact's Membership Marked to Deceased via Inline #16724
Conversation
(Standard links)
|
@eileenmcnaughton I have fixed any checkstyle warnings, Please review. |
Can we now remove these lines ... civicrm-core/CRM/Contact/Form/Contact.php Lines 910 to 918 in dfd10cd
|
One of the 2 fails - api.v4.Entity.ConformanceTest.testConformance - is a known bug in our test suite :-( The other one is being caused (I think) because your test is not deleting the membership it created. This might help - #16756 As an aside we will want you to squash your git commits down to a single commit - the general trick is
|
* Test that after checking the person as 'Deceased', the Membership is also 'Deceased' both through inline and normal edit. | ||
*/ | ||
public function testDeceasedMembershipInline() { | ||
$membershipStatusID = $this->membershipStatusCreate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the class you are using already created a membershipStatus in the setup so you can use that - from the setup
$this->_contactID = $this->individualCreate();
$this->_membershipTypeID = $this->membershipTypeCreate(['member_of_contact_id' => $this->_contactID]);
$this->_membershipStatusID = $this->membershipStatusCreate('test status');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I use, the membershipStatus in the setup, i think the teardown function will automatically delete that membership so then I won't have to call the delete function and it will pass the 2nd test as well. Am I right? or will I have to call the delete function even then?
Ok @eileenmcnaughton, Thanks! I will make the desired changes and let you know :) |
@eileenmcnaughton, I am not sure of removing this, because the normal edit still works through |
Signed-off-by: Kartik Kathuria <[email protected]> Signed-off-by: Kartik Kathuria <[email protected]> Signed-off-by: Kartik Kathuria <[email protected]> Signed-off-by: Kartik Kathuria <[email protected]>
@eileenmcnaughton, all tests have passed and I have even squashed the commits. Please check. |
Great - I tested this & it works - yay - for merging your commit to core! |
FYI @kartik1000 I've been trying to get rid of unnecessary uses of I've done #16874 to clean it up (and some other code cleanup in that file while I was at it). |
Great @colemanw! Yes if it makes it simpler. Why not. |
No problem. Thanks again for your contribution @kartik1000 |
Signed-off-by: Kartik Kathuria [email protected]
Overview
The Deceased Contact's Membership will also be Deceased, if you mark a contact as deceased even via Inline. The BAO Contact Create function will call the updateMemberhship function and change the Contact's Membership Status. Added Test as well for the same.