From bc3899eb3d821152dca3ae949869612fe65bf98e Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Thu, 8 Mar 2018 17:30:15 +0000
Subject: [PATCH] Sort by the current leader of the submission

---
 opentech/apply/funds/tables.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/opentech/apply/funds/tables.py b/opentech/apply/funds/tables.py
index e832c95e0..689a196f5 100644
--- a/opentech/apply/funds/tables.py
+++ b/opentech/apply/funds/tables.py
@@ -23,6 +23,7 @@ class SubmissionsTable(tables.Table):
 
     class Meta:
         model = ApplicationSubmission
+        order_by = ('-submit_time',)
         fields = ('title', 'status_name', 'stage', 'page', 'round', 'submit_time')
         template = 'funds/tables/table.html'
         row_attrs = {
@@ -41,6 +42,8 @@ class SubmissionsTable(tables.Table):
 
 class AdminSubmissionsTable(SubmissionsTable):
     """Adds admin only columns to the submissions table"""
+    lead = tables.Column(order_by=('lead.full_name',))
+
     class Meta(SubmissionsTable.Meta):
         fields = ('title', 'status_name', 'stage', 'page', 'round', 'lead', 'submit_time')  # type: ignore
 
-- 
GitLab