Re: Improvements to the TODO page
On Tue, 18 Jan 2011 01:35:58 -0500 Michael Gilbert wrote:
> Hi,
>
> I've implemented a couple patches that I think make the TODO page a
> little more informative. The first patch adds the full CVE text
> (rather than the short version in CVE/list). The second adds the todo
> notes to the page as well.
>
> If I don't get any comments, I'll commit this in a few days.
The patch files would probably be helpful ;)
Mike
diff --git a/bin/tracker_service.py b/bin/tracker_service.py
index d2b3a5b..37f50a2 100644
--- a/bin/tracker_service.py
+++ b/bin/tracker_service.py
@@ -327,11 +327,7 @@ data source.""")],
if source_xref:
yield B("Source"), source_xref
- nvd = self.db.getNVD(cursor, bug.name)
-
- if nvd and nvd.cve_desc:
- yield B("Description"), nvd.cve_desc
- elif bug.description:
+ if bug.description:
yield B("Description"), bug.description
xref = list(self.db.getBugXrefs(cursor, bug.name))
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index 030fd77..fd3a814 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -1061,6 +1061,12 @@ class DB:
FROM nvd_data AS n, package_notes AS p
WHERE p.bug_name == n.cve_name
AND p.urgency == 'not yet assigned'""")
+ cursor.execute(
+ """REPLACE INTO bugs
+ SELECT b.name, b.cve_status, b.not_for_us, n.cve_desc,
+ b.release_date, b.source_file, b.source_line
+ FROM nvd_data AS n, bugs AS b
+ WHERE n.cve_name = b.name AND n.cve_desc <> ''""")
# Calculate the release-specific bug status.
diff --git a/bin/tracker_service.py b/bin/tracker_service.py
index 37f50a2..4a26fdc 100644
--- a/bin/tracker_service.py
+++ b/bin/tracker_service.py
@@ -822,11 +822,11 @@ checker to find out why they have not entered testing yet."""),
'Hide "check" TODOs')
def gen():
- for (bug, description) in self.db.getTODOs(hide_check=hide_check):
- yield self.make_xref(url, bug), description
+ for (bug, description, note) in self.db.getTODOs(hide_check=hide_check):
+ yield self.make_xref(url, bug), description, note
return self.create_page(
- url, "Bugs with TODO items",
- [P(flags), make_table(gen(), caption=("Bug", "Description"))])
+ url, 'Bugs with TODO items',
+ [P(flags), make_table(gen(), caption=('Bug', 'Description', 'Note'))])
def page_status_undetermined(self, path, params, url):
def gen():
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index fd3a814..7892ba5 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -1693,7 +1693,7 @@ class DB:
cursor = self.cursor()
if hide_check:
return cursor.execute(
- """SELECT DISTINCT bugs.name, bugs.description
+ """SELECT DISTINCT bugs.name, bugs.description, bugs_notes.comment
FROM bugs_notes, bugs
WHERE bugs_notes.typ = 'TODO'
AND bugs_notes.comment <> 'check'
@@ -1701,7 +1701,7 @@ class DB:
ORDER BY name """)
else:
return cursor.execute(
- """SELECT DISTINCT bugs.name, bugs.description
+ """SELECT DISTINCT bugs.name, bugs.description, bugs_notes.comment
FROM bugs_notes, bugs
WHERE bugs_notes.typ = 'TODO'
AND bugs.name = bugs_notes.bug_name
Reply to: