use issue-id instead of issue-number throughout PR, not just for app-db

This commit is contained in:
Rob Culliton 2018-04-12 15:07:51 -04:00 committed by Tetiana Churikova
parent 6724e2612a
commit 61e8d2188f
4 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@ CREATE VIEW "public"."claims_view" AS SELECT i.title AS issue_title,
p.title AS pr_title, -- added
p.pr_number AS pr_number, -- added
p.pr_id AS pr_id, -- added
i.issue_id AS issue_id, -- added
COALESCE(u.name, u.login) AS user_name,
u.avatar_url AS user_avatar_url,
i.payout_receipt,
@ -39,6 +40,7 @@ CREATE VIEW "public"."activity_feed_view" AS -- altered
claims_view.pr_number, -- added
claims_view.pr_id, -- added
claims_view.issue_number,
claims_view.issue_id, -- added
claims_view.user_name,
claims_view.user_avatar_url,
claims_view.balance_eth,
@ -59,6 +61,7 @@ UNION
claims_view.pr_number, -- added
claims_view.pr_id, -- added
claims_view.issue_number,
claims_view.issue_id, -- added
claims_view.user_name,
claims_view.user_avatar_url,
claims_view.balance_eth,
@ -78,6 +81,7 @@ UNION
claims_view.pr_number, -- added
claims_view.pr_id, -- added
claims_view.issue_number,
claims_view.issue_id, -- added
claims_view.user_name,
claims_view.user_avatar_url,
claims_view.balance_eth,

View File

@ -599,6 +599,7 @@ SELECT
pr_title,
pr_id,
issue_number,
issue_id,
user_name,
user_avatar_url,
balance_eth,

View File

@ -62,8 +62,8 @@
(map (fn [bounty]
(let [matching-claims (filter
(fn [claim]
(= (:issue-number claim)
(:issue-number bounty)))
(= (:issue-id claim)
(:issue-id bounty)))
activity-feed)]
(assoc bounty :claims matching-claims)))))]
{:items items