liquid_feedback_core
changeset 217:9474e2038590
Change in "rank" order of admitted initiatives:
Winner first, then eligible, then non-eligible initiatives;
second ordering is "schulze_rank";
third ordering is "vote_ratio";
fallback ordering is "id"
Winner first, then eligible, then non-eligible initiatives;
second ordering is "schulze_rank";
third ordering is "vote_ratio";
fallback ordering is "id"
author | jbe |
---|---|
date | Wed Feb 22 20:50:59 2012 +0100 (2012-02-22) |
parents | f6ec320e19d4 |
children | 2571bb3bdf56 |
files | core.sql |
line diff
1.1 --- a/core.sql Wed Feb 22 20:45:01 2012 +0100 1.2 +++ b/core.sql Wed Feb 22 20:50:59 2012 +0100 1.3 @@ -3787,7 +3787,10 @@ 1.4 SELECT "id" AS "initiative_id" 1.5 FROM "initiative" 1.6 WHERE "issue_id" = "issue_id_p" AND "eligible" 1.7 - ORDER BY "schulze_rank", "id" 1.8 + ORDER BY 1.9 + "schulze_rank", 1.10 + "vote_ratio"("positive_votes", "negative_votes"), 1.11 + "id" 1.12 LIMIT 1 1.13 ) AS "subquery" 1.14 WHERE "id" = "subquery"."initiative_id"; 1.15 @@ -3799,8 +3802,9 @@ 1.16 WHERE "issue_id" = "issue_id_p" AND "admitted" 1.17 ORDER BY 1.18 "winner" DESC, 1.19 - ("direct_majority" AND "indirect_majority") DESC, 1.20 + "eligible" DESC, 1.21 "schulze_rank", 1.22 + "vote_ratio"("positive_votes", "negative_votes"), 1.23 "id" 1.24 LOOP 1.25 UPDATE "initiative" SET "rank" = "rank_v"