Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Contact diary: Make it possible to change contact people sort order #325

Open
tyrann0us opened this issue Jan 8, 2021 · 1 comment
Open
Assignees
Labels
contact-journal Issues regarding the contact diary enhancement New feature or request mirrored-to-jira This item is also tracked internally in JIRA

Comments

@tyrann0us
Copy link

tyrann0us commented Jan 8, 2021

Current implementation

The view "Edit People" sorts people alphabetically. Under the assumption that the naming convention is {firstName} {lastName}, they are sorted by first name. It is not possible to change this.

Suggested Enhancement

It should be possible to sort contacts by last name. Ideally, the sort order would be read from the phone's contact app settings.

Expected Benefits

This would list contacts in the same family among themselves, making it easier to see which family members you've been in contact with. Also, this would reflect the order of the phone's contact app, resulting in a more "familiar looking" list.

Notes

I know that the entire person name is stored as one string in the database. So we would need some kind of logic that explodes the string and sorts it by the last key, which should be the last name.

Of course, this wouldn't make sense if users entered contacts differently (e.g. {lastName}, {firstName}). Perhaps the name column of the database should be split into firstName TEXT NOT NULL CHECK (LENGTH(name) <= 250) and lastName TEXT NOT NULL CHECK (LENGTH(name) <= 250) in v3 of the ContactDiaryStoreSchema.

Edit: Having separate columns for first and last name would definitely make sense, especially when you want to support SORMAS-compatible exports, see #297 and https://github.com/hzi-braunschweig/SORMAS-Project/blob/4df8bb180c3d864c8b04ffd91f4e583739950160/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDto.java#L39-L40.


Internal Tracking ID: EXPOSUREAPP-3034

@tyrann0us tyrann0us added the enhancement New feature or request label Jan 8, 2021
@dsarkar dsarkar added contact-journal Issues regarding the contact diary mirrored-to-jira This item is also tracked internally in JIRA labels Jan 8, 2021
@dsarkar
Copy link
Member

dsarkar commented Jan 8, 2021

Internal Tracking ID: EXPOSUREAPP-3034

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contact-journal Issues regarding the contact diary enhancement New feature or request mirrored-to-jira This item is also tracked internally in JIRA
Projects
None yet
Development

No branches or pull requests

3 participants