liquid_feedback_core
changeset 502:f39c673420cb
Use "supporter_count" instead of "harmonic_weight" to determine leading initiative for notification system
author | jbe |
---|---|
date | Mon Apr 04 23:55:22 2016 +0200 (2016-04-04) |
parents | 4a8d9f00867b |
children | 986d8f3a6895 |
files | core.sql update/core-update.v3.1.0-v3.2.0.sql |
line diff
1.1 --- a/core.sql Mon Apr 04 18:51:13 2016 +0200 1.2 +++ b/core.sql Mon Apr 04 23:55:22 2016 +0200 1.3 @@ -2503,9 +2503,9 @@ 1.4 SELECT NULL FROM "initiative" AS "better_initiative" 1.5 WHERE "better_initiative"."issue_id" = "initiative"."issue_id" 1.6 AND 1.7 - ( COALESCE("better_initiative"."harmonic_weight", -1), 1.8 + ( COALESCE("better_initiative"."supporter_count", -1), 1.9 -"better_initiative"."id" ) > 1.10 - ( COALESCE("initiative"."harmonic_weight", -1), 1.11 + ( COALESCE("initiative"."supporter_count", -1), 1.12 -"initiative"."id" ) 1.13 ) AS "leading" 1.14 FROM ( 1.15 @@ -2537,7 +2537,7 @@ 1.16 ORDER BY 1.17 "uf_initiative"."recipient_id", 1.18 "initiative"."issue_id", 1.19 - "initiative"."harmonic_weight" DESC, 1.20 + "initiative"."supporter_count" DESC, 1.21 "initiative"."id" 1.22 ) AS "subquery" 1.23 WHERE NOT EXISTS (
2.1 --- a/update/core-update.v3.1.0-v3.2.0.sql Mon Apr 04 18:51:13 2016 +0200 2.2 +++ b/update/core-update.v3.1.0-v3.2.0.sql Mon Apr 04 23:55:22 2016 +0200 2.3 @@ -222,9 +222,9 @@ 2.4 SELECT NULL FROM "initiative" AS "better_initiative" 2.5 WHERE "better_initiative"."issue_id" = "initiative"."issue_id" 2.6 AND 2.7 - ( COALESCE("better_initiative"."harmonic_weight", -1), 2.8 + ( COALESCE("better_initiative"."supporter_count", -1), 2.9 -"better_initiative"."id" ) > 2.10 - ( COALESCE("initiative"."harmonic_weight", -1), 2.11 + ( COALESCE("initiative"."supporter_count", -1), 2.12 -"initiative"."id" ) 2.13 ) AS "leading" 2.14 FROM ( 2.15 @@ -256,7 +256,7 @@ 2.16 ORDER BY 2.17 "uf_initiative"."recipient_id", 2.18 "initiative"."issue_id", 2.19 - "initiative"."harmonic_weight" DESC, 2.20 + "initiative"."supporter_count" DESC, 2.21 "initiative"."id" 2.22 ) AS "subquery" 2.23 WHERE NOT EXISTS (