Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make People page default sort configurable (UHC mode) #4752

Closed
amandacilek-zz opened this issue Jul 24, 2018 · 5 comments
Closed

Make People page default sort configurable (UHC mode) #4752

amandacilek-zz opened this issue Jul 24, 2018 · 5 comments
Assignees
Labels
Priority: 2 - Medium Normal priority Type: Improvement Make something better

Comments

@amandacilek-zz
Copy link

amandacilek-zz commented Jul 24, 2018

Right now the default sort for the People page list is always "Alphabetically'. What we'd like to do is make the default sort configurable. This way, projects that are prioritizing UHC mode can configure the list to sort "By date last visited" by default if they like.

This has nothing to do with the sort options icon or menu. Users should still be able to toggle between sorting alphabetically or by date at will.

EDIT: Gareth brought up the possibility of simply defaulting all UHC projects to sort "by date last visited". I originally thought that would be fine, but now I think we should try to make it configurable. Here's why: we are now adding in counts of visits per month as well. Although we do not currently have a sort for "By number of visits this month" I can see that coming up anytime. When it does, we probably would want to give partners the choice between setting the default sort to "By date last visited" or "By number of visits this month". Why give them a choice? Because some partners have very specific goals for number of visits per month (like Muso) while others do not.

@amandacilek-zz amandacilek-zz added Status: Blocked waiting for triage Blocked waiting for prioritisation Type: Improvement Make something better labels Jul 24, 2018
@amandacilek-zz amandacilek-zz changed the title Make People page default sort configurable (UHC) Make UHC People page default sort "by date last visited" or make default sort configurable Jul 24, 2018
@garethbowen garethbowen removed their assignment Jul 25, 2018
@amandacilek-zz amandacilek-zz changed the title Make UHC People page default sort "by date last visited" or make default sort configurable Make UHC People page default sort configurable Jul 25, 2018
@garethbowen garethbowen added Status: 1 - Triaged Priority: 2 - Medium Normal priority and removed Status: Blocked waiting for triage Blocked waiting for prioritisation labels Jul 26, 2018
@amandacilek-zz amandacilek-zz changed the title Make UHC People page default sort configurable Make People page default sort configurable (UHC mode) Jul 26, 2018
@dianabarsan dianabarsan self-assigned this Aug 2, 2018
dianabarsan added a commit that referenced this issue Aug 15, 2018
Adds visit count display in contacts list. Visit count display is conditioned by the same permission as displaying last visited date. Visits are counted based on the calendar month, with each month starting on either the 1st or on a configurable date. Visit counters may be color coded if a specific visit count goal configured.

Adds UHC app configuration section.
Adds UHC configuration with options to select default sorting contacts lists by last visited date, visit counter settings for monthly count goal and the month reset/start date.

#4758
#4752
dianabarsan added a commit that referenced this issue Aug 15, 2018
Adds visit count display in contacts list. Visit count display is
conditioned by the same permission as displaying last visited date.
Visits are counted based on the calendar month, with each month
starting on either the 1st or on a configurable date. Visit counters
may be color coded if a specific visit count goal configured.

Adds UHC app configuration section.
Adds UHC configuration with options to select default sorting contacts
lists by last visited date, visit counter settings for monthly count
goal and the month reset/start date.

#4758
#4752
dianabarsan added a commit that referenced this issue Aug 15, 2018
Adds visit count display in contacts list. Visit count display is
conditioned by the same permission as displaying last visited date.
Visits are counted based on the calendar month, with each month
starting on either the 1st or on a configurable date. Visit counters
may be color coded if a specific visit count goal configured.

Adds UHC app configuration section.
Adds UHC configuration with options to select default sorting contacts
lists by last visited date, visit counter settings for monthly count
goal and the month reset/start date.

#4758
#4752
@dianabarsan dianabarsan removed their assignment Aug 15, 2018
@dianabarsan
Copy link
Member

Merged into 2.18 and forward ported to 3.0.x and master.

@newtewt newtewt self-assigned this Aug 21, 2018
@dianabarsan
Copy link
Member

dianabarsan commented Aug 27, 2018

To enable default contact sorting to be based on last visited date, you need to configure it in app_settings. Add the following section:

"uhc": {
    "contacts_default_sort": "",
    "visit_count": {
        "month_start_date": 1,
        "visit_count_goal": 0
     }
}

where:

Setting Default Accepted values Description
contacts_default_sort empty string * last_visited_date: default contact sorting will be based on last visited date, anything else: default contact sorting will be alphabetical
visit_count / month_start_date 1 1-31 Designates the monthly date when the visit count is reset.
visit_count / visit_count_goal 0 integer >= 0 Designates the monthly visit count goal.

@ngaruko
Copy link
Contributor

ngaruko commented Aug 27, 2018

Tested on beta-old.dev. Just a note for the QA team attempting to test this. One way to do it is :

  • Go to the instance settings page '/dashboard/_design/dashboard/_rewrite/settings#/apps(like [here](https://beta-old.dev.medicmobile.org/dashboard/_design/dashboard/_rewrite/settings#/apps) for beta-old) -Clicksettings`
    image

  • Click App Settings then Back up
    image

  • The settings will be downloaded
    -Go to folder/directory where the file was saved. Rename it to app_settings.json

  • Change the contacts_default_sort in uhc to last_visited_date (to set the default sort to last visited date). Save.

 "uhc": {
        "contacts_default_sort": "last_visited_date",
        "visit_count": {
            "month_start_date": 1,
            "visit_count_goal": 2
        }
    }
  • Open terminal in the folder and run medic-conf --instance beta-old.dev upload-app-settings
  • Back to webapp. Verify default sort changes are applied

@abbyad
Copy link
Contributor

abbyad commented Aug 28, 2018

Thanks for the detailed notes! Using Dashboard to manage app settings can be problematic, so we've tried to use only medic-conf. You got around the worst of it by uploading via medic-conf, and you could also use medic-conf's backup-app-settings action to avoid using Dashboard altogether.

garethbowen added a commit to medic/medic-docs that referenced this issue Sep 9, 2018
@garethbowen
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 - Medium Normal priority Type: Improvement Make something better
Projects
None yet
Development

No branches or pull requests

6 participants