diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2011-12-22 19:25:07 +0100 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2011-12-22 19:25:07 +0100 |
commit | cd044314f87957043f8837ac6c2cab1ac3dfd871 (patch) | |
tree | c784c987db8d1bd0426d86bc26ae3403e78c77aa | |
parent | 3a67ee8cd35471c5999ef1f134582d6622609bd0 (diff) |
Update SQL to handle the new fixed states 'fixed - user' and 'fixed - council'.
-rwxr-xr-x | bin/showcouncilrates | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/showcouncilrates b/bin/showcouncilrates index 9ae5c3e7b..e4e9487de 100755 --- a/bin/showcouncilrates +++ b/bin/showcouncilrates @@ -26,9 +26,10 @@ BEGIN { my $query = "SELECT council, COUNT(*) AS total, SUM(fixed) AS fixed FROM (SELECT council, - CASE WHEN state = 'fixed' THEN 1 ELSE 0 END AS fixed + CASE WHEN state in ('fixed','fixed - user', 'fixed - council') + THEN 1 ELSE 0 END AS fixed FROM problem WHERE confirmed IS NOT NULL AND - state IN ('fixed', 'confirmed') AND + state IN ('fixed', 'fixed - user', 'fixed - council', 'confirmed') AND whensent < NOW() - INTERVAL '4 weeks') AS a GROUP BY council"; |