Hi,
I'm missing a fixed_date column in bugs/bugs_archived for my research,
the second patch implements this. Unfortunately, I haven't been able to
test it, but I'm reasonably sure it will work. Feedback welcome. If it
looks good, could someone please apply it?
The first patch drops the blocks/blockedby elements from the TODO since
they're already implemented.
Kind regards,
Ryan
--
|_)|_/ Ryan Kavanagh | GnuPG key
| \| \ http://ryanak.ca/ | 4A11C97A (Transitioning from E95EDDC9)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
From 8da302ae987b0d641ae9af556e3762e665f92988 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh <ryanakca@kubuntu.org> Date: Thu, 26 May 2011 07:31:29 -0400 Subject: [PATCH 1/2] blocks/blockedby are already implemented --- TODO | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/TODO b/TODO index eced202..8f217f1 100644 --- a/TODO +++ b/TODO @@ -23,7 +23,7 @@ packages/sources bugs.debian.org --------------- - (prio: medium) Optimize bugs importing (again) -- missing stuff: blocks, found_date/fixed_date, blockedby, unarchived, summary, affects +- missing stuff: found_date/fixed_date, unarchived, summary, affects, posix_fadvise? upload-history -- 1.7.5.1
From 05249886fef49d8f3cbefd960c41f7f44681a108 Mon Sep 17 00:00:00 2001
From: Ryan Kavanagh <ryanakca@kubuntu.org>
Date: Thu, 26 May 2011 07:28:16 -0400
Subject: [PATCH 2/2] Done date patch
---
TODO | 3 +--
sql/setup.sql | 4 ++--
udd/bugs_gatherer.pl | 8 ++++----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/TODO b/TODO
index 8f217f1..8582662 100644
--- a/TODO
+++ b/TODO
@@ -23,8 +23,7 @@ packages/sources
bugs.debian.org
---------------
- (prio: medium) Optimize bugs importing (again)
-- missing stuff: found_date/fixed_date, unarchived, summary, affects,
- posix_fadvise?
+- missing stuff: unarchived, summary, affects, posix_fadvise?
upload-history
--------------
diff --git a/sql/setup.sql b/sql/setup.sql
index 4932c65..2f01ec3 100644
--- a/sql/setup.sql
+++ b/sql/setup.sql
@@ -195,7 +195,7 @@ CREATE TABLE bugs
(id int PRIMARY KEY, package text, source text, arrival timestamp, status text,
severity bugs_severity, submitter text, submitter_name text,
submitter_email text, owner text, owner_name text, owner_email text,
- done text, done_name text, done_email text, title text,
+ done text, done_name text, done_email text, done_date timestamp, title text,
last_modified timestamp, forwarded text, affects_oldstable boolean,
affects_stable boolean,
affects_testing boolean, affects_unstable boolean,
@@ -235,7 +235,7 @@ CREATE TABLE archived_bugs
(id int PRIMARY KEY, package text, source text, arrival timestamp, status text,
severity bugs_severity, submitter text, submitter_name text,
submitter_email text, owner text, owner_name text, owner_email text,
- done text, done_name text, done_email text, title text,
+ done text, done_name text, done_email text, done_date timestamp, title text,
last_modified timestamp, forwarded text, affects_oldstable boolean,
affects_stable boolean,
affects_testing boolean, affects_unstable boolean,
diff --git a/udd/bugs_gatherer.pl b/udd/bugs_gatherer.pl
index 4b0b1f4..38eefa8 100644
--- a/udd/bugs_gatherer.pl
+++ b/udd/bugs_gatherer.pl
@@ -180,7 +180,7 @@ sub run {
my $location = $src_config{archived} ? 'archive' : 'db_h';
$table = $src_config{archived} ? $archived_table : $table;
# Read all bugs
- my $insert_bugs_handle = $dbh->prepare("INSERT INTO $table (id, package, source, arrival, status, severity, submitter, submitter_name, submitter_email, owner, owner_name, owner_email, done, done_name, done_email, title, forwarded, last_modified, affects_oldstable, affects_stable, affects_testing, affects_unstable, affects_experimental) VALUES (\$1, \$2, \$3, \$4::abstime, \$5, \$6, \$7, \$8, \$9, \$10, \$11, \$12, \$13, \$14, \$15, \$16, \$17, \$18::abstime, \$19, \$20, \$21, \$22, \$23)");
+ my $insert_bugs_handle = $dbh->prepare("INSERT INTO $table (id, package, source, arrival, status, severity, submitter, submitter_name, submitter_email, owner, owner_name, owner_email, done, done_name, done_email, done_date, title, forwarded, last_modified, affects_oldstable, affects_stable, affects_testing, affects_unstable, affects_experimental) VALUES (\$1, \$2, \$3, \$4::abstime, \$5, \$6, \$7, \$8, \$9, \$10, \$11, \$12, \$13, \$14, \$15, \$16::abstime, \$17, \$18, \$19::abstime, \$20, \$21, \$22, \$23, \$24)");
my $insert_bugs_packages_handle = $dbh->prepare("INSERT INTO ${table}_packages (id, package, source) VALUES (\$1, \$2, \$3)");
my $insert_bugs_found_handle = $dbh->prepare("INSERT INTO ${table}_found_in (id, version) VALUES (\$1, \$2)");
my $insert_bugs_fixed_handle = $dbh->prepare("INSERT INTO ${table}_fixed_in (id, version) VALUES (\$1, \$2)");
@@ -213,7 +213,7 @@ sub run {
} else {
$bug{$_} = 0;
}
- } qw{date log_modified};
+ } qw{date log_modified done_date};
my $srcpkg;
if ($bug{package} =~ /^src:(.*)/)
@@ -312,8 +312,8 @@ sub run {
# Insert data into bugs table
$insert_bugs_handle->execute($bug_nr, $bug{package}, $srcpkg, $bug{date}, $bug{pending},
$bug{severity}, $bug{originator}, $submitter_name, $submitter_email, $bug{owner},
- $owner_name, $owner_email, $bug{done}, $done_name, $done_email, $bug{subject},
- $bug{forwarded}, $bug{log_modified},
+ $owner_name, $owner_email, $bug{done}, $done_name, $done_email, $bug{done_date},
+ $bug{subject}, $bug{forwarded}, $bug{log_modified},
$present_in_oldstable, $present_in_stable, $present_in_testing, $present_in_unstable, $present_in_experimental) or die $!;
my $src;
--
1.7.5.1
Attachment:
signature.asc
Description: Digital signature