Can't send SMS to mailing group whose parent isn't a mailing group
- Create a group (Group A) that's not a mailing group.
- Create a second group (Group B) that IS a mailing group. Make it a child group of Group A.
- Send a new SMS. Attempt to send to Group B.
Expected Result: Group B should be available to choose.
Actual Result: Group B is not available as an option.
Digging into this - the bug is actually in
CRM_Core_PseudoConstant::nestedGroup when called with a
$groupType argument - which isn't done anywhere else in the (modern) code. Scheduled Reminders tries, but gets the argument order wrong
I'm unsure how to proceed. I thought, "let's display the parents of mailing groups also" - but this is a) inexact, b) could cause permissions issues.
The more I think about it, the more I think we should use the widget used in CiviMail to select groups - and deprecate the use of the
$groupType argument here, since it's unused and broken. The CiviMail widget has had a lot of eyes on it, and was designed in part to deal with the same issues Noah's patch does.