Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

When looking at ONLY success or error or unknown number in the platform it should be possible to export ONLY success, error and unknown numbers #1127

Open
tineml opened this issue Jun 6, 2019 · 1 comment
Labels
Analytics Analytics backend frontend good first issue summer project Suitable to be done as part of the 2019 summer project

Comments

@tineml
Copy link
Collaborator

tineml commented Jun 6, 2019

image

@tineml tineml added frontend good first issue Analytics Analytics summer project Suitable to be done as part of the 2019 summer project labels Jun 6, 2019
@gardnk
Copy link
Collaborator

gardnk commented Jun 6, 2019

Use the CaseReportStatus enum instead of HealthRiskId when filtering on success and error

            public Func<CaseReportForListing, bool> FilterPredicate
            {
                get
                {
                    switch (Filter?.ToLower())
                    {
                        case "success":
                            return _ => _.HealthRiskId != HealthRiskId.NotSet && _.HealthRisk != "Unknown";
                        case "error":
                            return _ => _.HealthRiskId == HealthRiskId.NotSet || _.HealthRisk == "Unknown";
                        case "unknownSender":
                            return _ => _.DataCollectorId == DataCollectorId.NotSet || _.DataCollectorDisplayName == "Unknown";
                        case "all":
                        default:
                            return _ => true;
                    }
                }
            }

And add download parameters to the request when sending from frontend.

        public class DownloadParameters
        {
            public string Format { get; set; }
            public string Filter { get; set; }
            public string SortBy { get; set; }
            public string Order { get; set; }
       }

@gardnk gardnk added the backend label Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Analytics Analytics backend frontend good first issue summer project Suitable to be done as part of the 2019 summer project
Projects
None yet
Development

No branches or pull requests

2 participants