Details
-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.7.27
-
Fix Version/s: None
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
-
Overview:Secondary address fails to save, or original address deleted when changing location types and primary status at the same time as adding a new address.
-
How it works currently:
-
How it should work:
-
Acceptance Criteria:Can change address location types at the same time as addresses without data loss.
Description
There appears to be a bug causing addresses to get deleted or fail to add during save when attempting to add a second address that has the same location type as the original address: bug has been confirmed on the CiviCRM Demo site.
The issue appears to me limited to instances where you want to change the Location Type of the original address to something else, while giving the new address the Location Type of the original address.
There are 2 different scenarios that cause two different results:
1. If you try to change only the location type, the original address is kept, and the new one is not saved
2. If you try to change the location type, and set the new address as primary, the new address is kept, and the original deleted
To replicate scenario 1:
- Create a contact with 1 address, set location type to "main", save contact
- Edit contact, set the location type of the original address to "home", add a new address and set the location type to "main", save
Result: new address does not save
To replicate scenario 2:
- Create a contact with 1 address, set location type to "main", save contact
- Edit contact, set the location type of the original address to "home", add a new address, set the location type to "main", and set the address as the Primary location, save
Result: new address is saved, original address is deleted
Attachments
Issue Links
- links to