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

Reviewer not showing up if no reviews are done #92

Open
0kl-usds opened this issue Oct 30, 2022 · 0 comments
Open

Reviewer not showing up if no reviews are done #92

0kl-usds opened this issue Oct 30, 2022 · 0 comments

Comments

@0kl-usds
Copy link
Contributor

Due to this line, reviewers only show up if they have done a review.

Ideally in the future there is a way to see all assigned reviewers, but separate out from those who have done a review (i.e. implement the auditor role)

CREATE OR REPLACE view reviewer_metrics AS
SELECT 
	au.id reviewer_id
	, au.name
	, au.email email
	, app.assessment_hurdle_id
	, COUNT(*) FILTER (WHERE approved IS false) pending_amendment
	, COUNT(*) FILTER (WHERE approved IS true) adjudicated
FROM application_evaluation ae
LEFT JOIN app_user au ON au.id = approver_id
LEFT JOIN application a ON a.id = ae.application_id
LEFT JOIN applicant app on app.id = a.applicant_id
group BY au.id, au.name, au.email, app.assessment_hurdle_id;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant