Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.0
-
Fix Version/s: Unscheduled
-
Component/s: None
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
Currently is_primary is enforced at the form layer, but this is not 100% reliable and doesn't help at all from the API layer, etc.
Desired behavior:
1. When creating, updating, or deleting an entity with an is_primary field, ensure that one and only one record of this type per parent object contains is_primary = 1. In the case of deleting the primary, we will just have to pick another at random and assign it as primary.
2. Find a clever way to automagically attach this behavior to any field in the db named is_primary so we are not creating and maintaining special cases for email, phone, address and any entities added in future.
Attachments
Issue Links
- is supplemented by
-
CRM-10719 Address inline edit overwrites data when more than one address per location is created
- Done/Fixed