From 478d10cef908c47f6686c6fa78d648764ca95bb0 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 7 May 2014 18:35:55 -0700 Subject: [PATCH] Removed closed changes from unreviewed list. Previously any MERGED or ABANDONED changes showed up in the unreviewed changes list for a project unless explicitly reviewed by the gertty user. This is problematic because changes in these states are closed and don't need further review. Remove them from the unreviewed list to cut down on noise. Note this is not symmetric currently with listing reviewed changes and all changes. I think gertty should also learn to ignore and remove MERGED changes from its DB entirely at some point. But not quite sure how we want to do that. Might only be useful to do that after we add the ability to view specific changes. Change-Id: I951a687250b79eec7eca00f877cb1cb50e867c09 --- gertty/db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gertty/db.py b/gertty/db.py index a3f5cb1..6783a7b 100644 --- a/gertty/db.py +++ b/gertty/db.py @@ -283,6 +283,8 @@ mapper(Project, project_table, properties=dict( unreviewed_changes=relationship(Change, primaryjoin=and_(project_table.c.key==change_table.c.project_key, change_table.c.hidden==False, + change_table.c.status!='MERGED', + change_table.c.status!='ABANDONED', change_table.c.reviewed==False), order_by=change_table.c.number, ),