liquid_feedback_core
changeset 121:8a1a488a1a67
Bugfix in function "freeze_after_snapshot"; Simplified function "close_voting"
Constraint "valid_state" on table "issue" requires, that "ranks_available" is set to true, if state is set to 'canceled_no_initiative_admitted'.
Function "close_voting" assumes that there was at least one initiative to be voted on (ensured by "freeze_after_snapshot").
Constraint "valid_state" on table "issue" requires, that "ranks_available" is set to true, if state is set to 'canceled_no_initiative_admitted'.
Function "close_voting" assumes that there was at least one initiative to be voted on (ensured by "freeze_after_snapshot").
author | jbe |
---|---|
date | Mon Mar 07 19:15:14 2011 +0100 (2011-03-07) |
parents | 92fc60ed705d |
children | 2a1f0bd5fcff |
files | core.sql update/core-update.v1.3.1-v1.4.0_rc1.sql |
line diff
1.1 --- a/core.sql Mon Mar 07 14:15:53 2011 +0100 1.2 +++ b/core.sql Mon Mar 07 19:15:14 2011 +0100 1.3 @@ -3258,11 +3258,12 @@ 1.4 WHERE "id" = "issue_id_p"; 1.5 ELSE 1.6 UPDATE "issue" SET 1.7 - "state" = 'canceled_no_initiative_admitted', 1.8 - "accepted" = coalesce("accepted", now()), 1.9 - "half_frozen" = coalesce("half_frozen", now()), 1.10 - "fully_frozen" = now(), 1.11 - "closed" = now() 1.12 + "state" = 'canceled_no_initiative_admitted', 1.13 + "accepted" = coalesce("accepted", now()), 1.14 + "half_frozen" = coalesce("half_frozen", now()), 1.15 + "fully_frozen" = now(), 1.16 + "closed" = now(), 1.17 + "ranks_available" = TRUE 1.18 WHERE "id" = "issue_id_p"; 1.19 -- NOTE: The following DELETE statements have effect only when 1.20 -- issue state has been manipulated 1.21 @@ -3800,17 +3801,10 @@ 1.22 -- mark issue as finished 1.23 UPDATE "issue" SET 1.24 "state" = 1.25 - CASE WHEN NOT EXISTS ( 1.26 - SELECT NULL FROM "initiative" 1.27 - WHERE "issue_id" = "issue_id_p" AND "admitted" 1.28 - ) THEN 1.29 - 'canceled_no_initiative_admitted'::"issue_state" 1.30 + CASE WHEN "dimension_v" = 0 THEN 1.31 + 'finished_without_winner'::"issue_state" 1.32 ELSE 1.33 - CASE WHEN "dimension_v" = 0 THEN 1.34 - 'finished_without_winner'::"issue_state" 1.35 - ELSE 1.36 - 'finished_with_winner'::"issue_state" 1.37 - END 1.38 + 'finished_with_winner'::"issue_state" 1.39 END, 1.40 "ranks_available" = TRUE 1.41 WHERE "id" = "issue_id_p";
2.1 --- a/update/core-update.v1.3.1-v1.4.0_rc1.sql Mon Mar 07 14:15:53 2011 +0100 2.2 +++ b/update/core-update.v1.3.1-v1.4.0_rc1.sql Mon Mar 07 19:15:14 2011 +0100 2.3 @@ -1238,11 +1238,12 @@ 2.4 WHERE "id" = "issue_id_p"; 2.5 ELSE 2.6 UPDATE "issue" SET 2.7 - "state" = 'canceled_no_initiative_admitted', 2.8 - "accepted" = coalesce("accepted", now()), 2.9 - "half_frozen" = coalesce("half_frozen", now()), 2.10 - "fully_frozen" = now(), 2.11 - "closed" = now() 2.12 + "state" = 'canceled_no_initiative_admitted', 2.13 + "accepted" = coalesce("accepted", now()), 2.14 + "half_frozen" = coalesce("half_frozen", now()), 2.15 + "fully_frozen" = now(), 2.16 + "closed" = now(), 2.17 + "ranks_available" = TRUE 2.18 WHERE "id" = "issue_id_p"; 2.19 -- NOTE: The following DELETE statements have effect only when 2.20 -- issue state has been manipulated 2.21 @@ -1575,17 +1576,10 @@ 2.22 -- mark issue as finished 2.23 UPDATE "issue" SET 2.24 "state" = 2.25 - CASE WHEN NOT EXISTS ( 2.26 - SELECT NULL FROM "initiative" 2.27 - WHERE "issue_id" = "issue_id_p" AND "admitted" 2.28 - ) THEN 2.29 - 'canceled_no_initiative_admitted'::"issue_state" 2.30 + CASE WHEN "dimension_v" = 0 THEN 2.31 + 'finished_without_winner'::"issue_state" 2.32 ELSE 2.33 - CASE WHEN "dimension_v" = 0 THEN 2.34 - 'finished_without_winner'::"issue_state" 2.35 - ELSE 2.36 - 'finished_with_winner'::"issue_state" 2.37 - END 2.38 + 'finished_with_winner'::"issue_state" 2.39 END, 2.40 "ranks_available" = TRUE 2.41 WHERE "id" = "issue_id_p";