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-19979 Fix issue where contacts cannot be removed from group or deleted if in status of pending #9797

Merged
merged 4 commits into from
Feb 9, 2017

Conversation

seamuslee001
Copy link
Contributor

@seamuslee001 seamuslee001 commented Feb 6, 2017

@seamuslee001
Copy link
Contributor Author

@BorislavZlatanov I have opened this PR to fix your issue, Have been able to reproduce issue in a unit test which is always a good sign

@seamuslee001
Copy link
Contributor Author

@BorislavZlatanov I believe i now have a fix for this in the commit #518dd0e

@eileenmcnaughton
Copy link
Contributor

Does the status field support IN rather than doing 2 calls?

ie. status_id => array('IN' => array('Pending', 'Removed'))

  • alternatively could we only check for pending if removed is empty

@seamuslee001
Copy link
Contributor Author

Possibly i'm not sure, I'll give it try @eileenmcnaughton

@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton tested it and does support IN and i also added Pending onto the check for if we have been supplied a status of Added

@BorislavZlatanov
Copy link
Contributor

@seamuslee001 I applied your latest patch to 4.7.14 and tried it.

When trying to delete from group a contact that has Pending status, I got the "Cannot Delete GroupContact" error.

When removing from group a contact that has Pending status, it removed it successfully with no errors. When deleting from group this contact that now has Removed status, it deleted it with no errors.

@seamuslee001
Copy link
Contributor Author

@BorislavZlatanov I believe with the latest commit I have solved the issue where pending cannot be "Deleted"

@BorislavZlatanov
Copy link
Contributor

@seamuslee001 Yes, I tested and both Removing and Deleting worked now. Thanks!

@eileenmcnaughton
Copy link
Contributor

Thanks @seamuslee001 & @BorislavZlatanov - looks good to me & has unit testing! and with your testing @BorislavZlatanov I'm happy to approve

@eileenmcnaughton eileenmcnaughton merged commit 4af6fbb into civicrm:master Feb 9, 2017
monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
CRM-19979 Fix issue where contacts cannot be removed from group or deleted if in status of pending
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.

4 participants