liquid_feedback_core

changeset 549:81a35235b450

Bugfix in function "write_event_initiator_trigger"
author jbe
date Tue Sep 12 16:23:12 2017 +0200 (2017-09-12)
parents 1adb0ad5900c
children 48ea1c309928
files core.sql update/core-update.v3.2.2-v4.0.0.sql
line diff
     1.1 --- a/core.sql	Sat Aug 05 16:10:43 2017 +0200
     1.2 +++ b/core.sql	Tue Sep 12 16:23:12 2017 +0200
     1.3 @@ -2204,14 +2204,24 @@
     1.4        "initiative_row" "initiative"%ROWTYPE;
     1.5        "issue_row"      "issue"%ROWTYPE;
     1.6        "area_row"       "area"%ROWTYPE;
     1.7 +      "accepted_v"     BOOLEAN = FALSE;
     1.8 +      "rejected_v"     BOOLEAN = FALSE;
     1.9      BEGIN
    1.10        IF TG_OP = 'UPDATE' THEN
    1.11          IF
    1.12            OLD."initiative_id" = NEW."initiative_id" AND
    1.13 -          OLD."member_id" = NEW."member_id" AND
    1.14 -          coalesce(OLD."accepted", FALSE) = coalesce(NEW."accepted", FALSE)
    1.15 +          OLD."member_id" = NEW."member_id"
    1.16          THEN
    1.17 -          RETURN NULL;
    1.18 +          IF
    1.19 +            coalesce(OLD."accepted", FALSE) = coalesce(NEW."accepted", FALSE)
    1.20 +          THEN
    1.21 +            RETURN NULL;
    1.22 +          END IF;
    1.23 +          IF coalesce(NEW."accepted", FALSE) = TRUE THEN
    1.24 +            "accepted_v" := TRUE;
    1.25 +          ELSE
    1.26 +            "rejected_v" := TRUE;
    1.27 +          END IF;
    1.28          END IF;
    1.29        END IF;
    1.30        IF (TG_OP = 'DELETE' OR TG_OP = 'UPDATE') AND NOT "accepted_v" THEN
     2.1 --- a/update/core-update.v3.2.2-v4.0.0.sql	Sat Aug 05 16:10:43 2017 +0200
     2.2 +++ b/update/core-update.v3.2.2-v4.0.0.sql	Tue Sep 12 16:23:12 2017 +0200
     2.3 @@ -1439,14 +1439,24 @@
     2.4        "initiative_row" "initiative"%ROWTYPE;
     2.5        "issue_row"      "issue"%ROWTYPE;
     2.6        "area_row"       "area"%ROWTYPE;
     2.7 +      "accepted_v"     BOOLEAN = FALSE;
     2.8 +      "rejected_v"     BOOLEAN = FALSE;
     2.9      BEGIN
    2.10        IF TG_OP = 'UPDATE' THEN
    2.11          IF
    2.12            OLD."initiative_id" = NEW."initiative_id" AND
    2.13 -          OLD."member_id" = NEW."member_id" AND
    2.14 -          coalesce(OLD."accepted", FALSE) = coalesce(NEW."accepted", FALSE)
    2.15 +          OLD."member_id" = NEW."member_id"
    2.16          THEN
    2.17 -          RETURN NULL;
    2.18 +          IF
    2.19 +            coalesce(OLD."accepted", FALSE) = coalesce(NEW."accepted", FALSE)
    2.20 +          THEN
    2.21 +            RETURN NULL;
    2.22 +          END IF;
    2.23 +          IF coalesce(NEW."accepted", FALSE) = TRUE THEN
    2.24 +            "accepted_v" := TRUE;
    2.25 +          ELSE
    2.26 +            "rejected_v" := TRUE;
    2.27 +          END IF;
    2.28          END IF;
    2.29        END IF;
    2.30        IF (TG_OP = 'DELETE' OR TG_OP = 'UPDATE') AND NOT "accepted_v" THEN

Impressum / About Us