Add option to adopt the home address of the source case [2]
Feature Description
Currently, users always have to re-enter the same addresses if cases and contacts share the same address (especially when case and contact are living in the same household). This is quite pesky and reduces effeciency a lot. Especially for families or persons having the same home address, it would be nice to adopt them from the source case.
Proposed Change
-
In the contact creation form (directory and case contact tab), add a boolean field; caption: 'Adopt home address of case person'
- Only show this field if a source case was selected and the field "Relationship with case" is "living in the same household"
- Add an eye icon next to the field - upon clicking, display the home address of the source case similarily to how the the geo locations are shown (non-editable)
- The checkbox should be prechecked if the conditions above apply
- When this field is pressed and the contact saved, adopt the home address of the selected source case in the contact person
-
In the contact line listing form (directory and ep bulk action), add the same boolean field; caption: 'Adopt home address of case person'
- Only show this field if a source case was selected
- Add an eye icon next to the field - upon clicking, display the home address of the source case similarily to how the the geo locations are shown (non-editable)
- The checkbox should be prechecked if the conditions above apply
- When this field is pressed and the contact saved, adopt the home address of the selected source case in the contact person
Note by @MartinWahnschaffe: Eye icon should go to the end of the checkbox caption, so we can use default components.
Acceptance Criteria
Implementation Details
- Integrate View icon for address behind the checkbox caption
- Implement in UI, no change to backend method signatures expected/desired
Additional Information

ISSUE TRACKER COMMENT
We updated the initial posting and closed https://github.com/hzi-braunschweig/SORMAS-Project/issues/8804.
Decided with @cmeyerhzi to remove old fillPersonAddressIfEmpty method of ContactController.
Reopening the ticket because Contacts can no longer be created via Line Listing. (can be created only if the Source Case is selected) Logs: contact line listing error.txt

Note: I encountered this when I was testing ticket #10601
Another finding: The home address pop-up is supposed to be non-editable according to the description, but it isn't. The user can edit the fields, but he cannot save the changes.

Validated on de1 on Version: 1.77.0-SNAPSHOT (8d282da).
The option for new contacts to adopt the address of the associated case is visible and functional (from Contacts directory OR a case' Contacts tab) : 1. In 'New Contact' form ( and Contacts 'Line listing' form (when 'Relationship with the case'='Live in the same household') 2. In 'Line listing' form if an associated case is selected (contacts can be created - reported issue was fixed)
Checked:
- checkbox is functional (pre-checked)
- caption does not overlap with other elements; extended text version for the line-listing form (for clarification)
- 'eye' icon and button are displayed at the end of the text
- icon and button is aligned and centered correctly - button is actionable.
- button action opens the correct case address; address/details fields are read-only (reported issue was fixed)
- address/other attributes are correctly applied to the contact only if 'same household' option is selected (functional even for mixed line-listing contacts).
Limitation:
- option is NOT available when editing a contact

The eye button is inconsistent compared to the eye icon for geo coordinates or reinfection where it does not have a frame.
Reopened the ticket based on @KristinaBorch 's above comment ('eye' button should not have a frame)
Validated on testing-1402 on Version: 1.77.1.
Eye icon border no longer displayed.
