diff display_issues_demo.py @ 20:3bb3d9a9f1b7

Filter by keywords and states. Configuration via configuration file. "No prio" grapf is displayed. (./display_issues_demo.py is not yet dynamic, it needs all states)
author Magnus Schieder <mschieder@intevation.de>
date Mon, 22 Oct 2018 16:49:58 +0200
parents adca5b3780d2
children 7a523e13fcb3
line wrap: on
line diff
--- a/display_issues_demo.py	Mon Jul 09 14:49:44 2018 +0200
+++ b/display_issues_demo.py	Mon Oct 22 16:49:58 2018 +0200
@@ -12,10 +12,21 @@
 GNU GENERAL PUBLIC LICENSE Version 3 or later.
 See http://www.gnu.org/licenses/gpl-3.0.txt for details
 """
+import configparser
+from display_issues import *
 
-from display_issues import *
+config = configparser.ConfigParser()
+config.read('config3.ini')
+
+keywords = config.get("SEARCH", "Keywords", fallback="")
+status = config.get("SEARCH", "Status", fallback="")
+columns = config.get("SEARCH", "Columns", fallback="critical, urgent, bug, feature, wish")
+noPrio = config.get("SEARCH", "IncludeNoPrio", fallback=False)
+if noPrio:
+    columns += ", None"
 
 cgitb.enable() # (optional) HTML traceback to browser
 #render_db_stats_as_html("./demo1.db", rcd.SELECT_ALL)
-render_db_stats_as_html("./demo1.db",
-        rcd.SELECT_WHERE.format("timestamp > date('now', '-2 month')"))
+render_db_stats_as_html("./demo3.db",
+        rcd.build_sql_select(columns).format("timestamp > date('now', '-2 month')"),
+        status, keywords)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)