diff options
-rw-r--r-- | gnats-controller.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnats-controller.lua b/gnats-controller.lua index 4fa036c..57eb3f3 100644 --- a/gnats-controller.lua +++ b/gnats-controller.lua @@ -378,6 +378,16 @@ function summary(self) -- Set the search criterias self.model:set_search_criteria(s) + local orgsummary = self.model:summary() + + -- Hide unwanted records + local summary = {} + for k,v in pairs(orgsummary) do + if not ((orgsummary[k]['state'] == "closed") and ((orgsummary[k]['category'] == "test") or (orgsummary[k]['category'] == "spam"))) then + table.insert(summary, v) + end + end + return { option={ script=ENV["SCRIPT_NAME"], prefix=self.conf.prefix, @@ -385,7 +395,7 @@ function summary(self) action = "edit", extra = "", }, - summary = self.model:summary(), + summary = summary, } end |