Currently we do not allow multiple contact subtypes to be assigned to a contact, and we do not allow user to change a contact's subtype if the contact record has contact-type-specific custom data associated with it. This project should allow the user to assign more than one subtype, and to change subtype assignments.
- new contact form has select for contact subtype, change it to multi-select
- in db save multiple contact subtype separated by CRM separator
- also update custom data code to load custom data according to assigned contact subtype(s)
- In profile change select to multi-select for contact subtype
- allow change of subtype in Contact Edit form regardless of presence of associated custom data.
- If custom data exists that is incompatible with updated contact subtype assignments we will need to delete those row(s) in custom_value_* table(s) after giving a warning and allowing user to cancel the operation. EXAMPLE: Contact subtype is currently 'Student' and the record has student-specific custom data. User changes subtype to 'Parent'. We'll need to check for this condition in postProcess. If there is data loss, we need to go to a confirm page prior to saving the update:
"WARNING: If you save the requested change to the Contact Subtype(s) assigned to this contact, custom data in the following custom data set(s) will be deleted:
- $customGroupTitle2 etc.
Click Cancel to return to the edit form with saving this change, or click Continue to save your changes."
- Currently "contact_sub_type" is varchar (64) change it to "text"
- Add db changes to upgrade tpl