Commits

Anonymous committed 1cba764

Version beta18

Bug fixed, which caused issue_voting_started events in timeline to be shown only after an issue had been closed

  • Participants
  • Parent commits 359d2b3
  • Tags beta18

Comments (0)

Files changed (2)

File core-update.beta17-beta18.sql

+BEGIN;
+
+CREATE OR REPLACE VIEW "liquid_feedback_version" AS
+  SELECT * FROM (VALUES ('beta18', NULL, NULL, NULL))
+  AS "subquery"("string", "major", "minor", "revision");
+
+CREATE OR REPLACE VIEW "timeline_issue" AS
+    SELECT
+      "created" AS "occurrence",
+      'issue_created'::"timeline_event" AS "event",
+      "id" AS "issue_id"
+    FROM "issue"
+  UNION ALL
+    SELECT
+      "closed" AS "occurrence",
+      'issue_canceled'::"timeline_event" AS "event",
+      "id" AS "issue_id"
+    FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" ISNULL
+  UNION ALL
+    SELECT
+      "accepted" AS "occurrence",
+      'issue_accepted'::"timeline_event" AS "event",
+      "id" AS "issue_id"
+    FROM "issue" WHERE "accepted" NOTNULL
+  UNION ALL
+    SELECT
+      "half_frozen" AS "occurrence",
+      'issue_half_frozen'::"timeline_event" AS "event",
+      "id" AS "issue_id"
+    FROM "issue" WHERE "half_frozen" NOTNULL
+  UNION ALL
+    SELECT
+      "fully_frozen" AS "occurrence",
+      'issue_voting_started'::"timeline_event" AS "event",
+      "id" AS "issue_id"
+    FROM "issue"
+    WHERE "fully_frozen" NOTNULL
+    AND ("closed" ISNULL OR "closed" != "fully_frozen")
+  UNION ALL
+    SELECT
+      "closed" AS "occurrence",
+      CASE WHEN "fully_frozen" = "closed" THEN
+        'issue_finished_without_voting'::"timeline_event"
+      ELSE
+        'issue_finished_after_voting'::"timeline_event"
+      END AS "event",
+      "id" AS "issue_id"
+    FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" NOTNULL;
+
+COMMIT;
 BEGIN;
 
 CREATE VIEW "liquid_feedback_version" AS
-  SELECT * FROM (VALUES ('beta17', NULL, NULL, NULL))
+  SELECT * FROM (VALUES ('beta18', NULL, NULL, NULL))
   AS "subquery"("string", "major", "minor", "revision");
 
 
       'issue_voting_started'::"timeline_event" AS "event",
       "id" AS "issue_id"
     FROM "issue"
-    WHERE "fully_frozen" NOTNULL AND "closed" != "fully_frozen"
+    WHERE "fully_frozen" NOTNULL
+    AND ("closed" ISNULL OR "closed" != "fully_frozen")
   UNION ALL
     SELECT
       "closed" AS "occurrence",