liquid_feedback_core
changeset 488:056ad11bbe66
Ignore suggestions with opinion also in returned column "new_suggestion_count" of view "updated_initiative"
author | jbe |
---|---|
date | Sun Apr 03 16:42:01 2016 +0200 (2016-04-03) |
parents | 14bca0b56925 |
children | 5abcd0043fff |
files | core.sql |
line diff
1.1 --- a/core.sql Sun Apr 03 16:26:38 2016 +0200 1.2 +++ b/core.sql Sun Apr 03 16:42:01 2016 +0200 1.3 @@ -2393,7 +2393,11 @@ 1.4 AND "draft"."id" > "supporter"."draft_id" 1.5 ) AS "new_draft", 1.6 ( SELECT count(1) FROM "suggestion" 1.7 + LEFT JOIN "opinion" ON 1.8 + "opinion"."member_id" = "supporter"."member_id" AND 1.9 + "opinion"."suggestion_id" = "suggestion"."id" 1.10 WHERE "suggestion"."initiative_id" = "initiative"."id" 1.11 + AND "opinion"."member_id" ISNULL 1.12 AND COALESCE( 1.13 "suggestion"."id" > "sent"."last_suggestion_id", 1.14 TRUE