liquid_feedback_core

changeset 69:c65002c1a509

Important bugfix, affecting correct counting of supporters/votes

Changed "trustee_id" to "truster_id" in following views:
- global_delegation
- area_delegation
- issue_delegation

Also updated comments for that views.

The new behaviour was expected by the following functions:
- membership_weight_with_skipping
- weight_of_added_delegations_for_population_snapshot
- weight_of_added_delegations_for_interest_snapshot
- weight_of_added_vote_delegations

The bug caused inactive members to falsely increase voting weight of trustees.
author jbe
date Mon Aug 30 22:01:08 2010 +0200 (2010-08-30)
parents 28c1af992cd3
children 5745db0b1a34
files core.sql
line diff
     1.1 --- a/core.sql	Mon Aug 16 14:45:28 2010 +0200
     1.2 +++ b/core.sql	Mon Aug 30 22:01:08 2010 +0200
     1.3 @@ -6,7 +6,7 @@
     1.4  BEGIN;
     1.5  
     1.6  CREATE VIEW "liquid_feedback_version" AS
     1.7 -  SELECT * FROM (VALUES ('1.2.5', 1, 2, 5))
     1.8 +  SELECT * FROM (VALUES ('1.2.6', 1, 2, 6))
     1.9    AS "subquery"("string", "major", "minor", "revision");
    1.10  
    1.11  
    1.12 @@ -1262,10 +1262,10 @@
    1.13      "delegation"."truster_id",
    1.14      "delegation"."trustee_id"
    1.15    FROM "delegation" JOIN "member"
    1.16 -  ON "delegation"."trustee_id" = "member"."id"
    1.17 +  ON "delegation"."truster_id" = "member"."id"
    1.18    WHERE "delegation"."scope" = 'global' AND "member"."active";
    1.19  
    1.20 -COMMENT ON VIEW "global_delegation" IS 'Global delegations to active members';
    1.21 +COMMENT ON VIEW "global_delegation" IS 'Global delegations from active members';
    1.22  
    1.23  
    1.24  CREATE VIEW "area_delegation" AS
    1.25 @@ -1284,7 +1284,7 @@
    1.26        "delegation"."truster_id",
    1.27        "delegation"."scope" DESC
    1.28    ) AS "subquery"
    1.29 -  JOIN "member" ON "subquery"."trustee_id" = "member"."id"
    1.30 +  JOIN "member" ON "subquery"."truster_id" = "member"."id"
    1.31    WHERE "member"."active";
    1.32  
    1.33  COMMENT ON VIEW "area_delegation" IS 'Active delegations for areas';
    1.34 @@ -1307,7 +1307,7 @@
    1.35        "delegation"."truster_id",
    1.36        "delegation"."scope" DESC
    1.37    ) AS "subquery"
    1.38 -  JOIN "member" ON "subquery"."trustee_id" = "member"."id"
    1.39 +  JOIN "member" ON "subquery"."truster_id" = "member"."id"
    1.40    WHERE "member"."active";
    1.41  
    1.42  COMMENT ON VIEW "issue_delegation" IS 'Active delegations for issues';

Impressum / About Us