liquid_feedback_core

diff update/core-update.v3.2.2-v4.0.0.sql @ 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 deabd90adae8
line diff
     1.1 --- a/update/core-update.v3.2.2-v4.0.0.sql	Sat Aug 05 16:10:43 2017 +0200
     1.2 +++ b/update/core-update.v3.2.2-v4.0.0.sql	Tue Sep 12 16:23:12 2017 +0200
     1.3 @@ -1439,14 +1439,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

Impressum / About Us