SORMAS-Project icon indicating copy to clipboard operation
SORMAS-Project copied to clipboard

Add option to adopt the home address of the source case [2]

Open kwa20 opened this issue 4 years ago • 2 comments

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

image

adoptHomeAddressLineListing

kwa20 avatar Oct 26 '21 15:10 kwa20

ISSUE TRACKER COMMENT

kwa20 avatar Feb 25 '22 15:02 kwa20

We updated the initial posting and closed https://github.com/hzi-braunschweig/SORMAS-Project/issues/8804.

SORMAS-ChristopherMeyer avatar Jun 16 '22 11:06 SORMAS-ChristopherMeyer

Decided with @cmeyerhzi to remove old fillPersonAddressIfEmpty method of ContactController.

ChristopherRiedel avatar Oct 05 '22 07:10 ChristopherRiedel

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

image

Note: I encountered this when I was testing ticket #10601

roxanamlendea avatar Nov 03 '22 13:11 roxanamlendea

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.

image

roxanamlendea avatar Nov 11 '22 11:11 roxanamlendea

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

image image image

dragosb-vg avatar Nov 24 '22 13:11 dragosb-vg

The eye button is inconsistent compared to the eye icon for geo coordinates or reinfection where it does not have a frame.

KristinaBorch avatar Nov 29 '22 12:11 KristinaBorch

Reopened the ticket based on @KristinaBorch 's above comment ('eye' button should not have a frame)

dragosb-vg avatar Nov 29 '22 12:11 dragosb-vg

Validated on testing-1402 on Version: 1.77.1. Eye icon border no longer displayed. image image

dragosb-vg avatar Dec 05 '22 13:12 dragosb-vg