Skip to content
New issue

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

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

Already on GitHub? # to your account

[candidate_list] Remove "Latest Visit Status" column? #7093

Closed
driusan opened this issue Oct 13, 2020 · 2 comments
Closed

[candidate_list] Remove "Latest Visit Status" column? #7093

driusan opened this issue Oct 13, 2020 · 2 comments
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@driusan
Copy link
Collaborator

driusan commented Oct 13, 2020

From what I can see in the code, the column "Latest Visit Status" on the candidate_list contains the result of max(s.Current_stage) AS LatestVisitStatus (grouped by CandID). This means that the column contains the highest (alphabetically) of the set 'Not Started', 'Screening', 'Visit', 'Approval', 'Subject', 'Recycling Bin' (the valid options of Current_stage in the session table) that the candidate has for any session. ie. if a candidate has sessions with values of "Not Started", then "Visit", then a last visit of "Approval" the value of "Latest Visit Status" will be "Visit".

It's not clear how that is supposed to be meaningful or what relation it has to the "Latest Visit Status". It seems to be the result of someone not understanding how "max" works on enums when writing the query.

Given that it doesn't work and no one has noticed, it seems like the column isn't really used and should be removed to free up space in an already excessively large table.

@driusan driusan added the Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) label Oct 13, 2020
@zaliqarosli
Copy link
Contributor

duplicate #5115

driusan added a commit to driusan/Loris that referenced this issue Oct 29, 2021
The max alphabetical visit doesn't mean anything.

Resolves aces#5115, aces#7093
driusan added a commit to driusan/Loris that referenced this issue May 17, 2022
The max alphabetical visit doesn't mean anything.

Resolves aces#5115, aces#7093
driusan added a commit that referenced this issue Oct 14, 2022
The max alphabetical visit doesn't mean anything. (See resolved issues for explanation.)

Resolves #5115, #7093
@driusan
Copy link
Collaborator Author

driusan commented Dec 20, 2022

Resolved by #7759

@driusan driusan closed this as completed Dec 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

No branches or pull requests

2 participants