[bugzilla-gnome-org-extensions] trace parser: Port to 4.4



commit 75762ac2cba8ad88fee0b85e6dd1caa996c1ac2c
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Thu Nov 13 21:16:40 2014 +0100

    trace parser: Port to 4.4

 TODO                     |    3 +++
 TraceParser/Extension.pm |    4 ++--
 TraceParser/lib/Trace.pm |    6 ------
 3 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/TODO b/TODO
index e6200a5..061d425 100644
--- a/TODO
+++ b/TODO
@@ -3,3 +3,6 @@
 - Describe User:
   Instead of listing all possible attachment statuses, just get all of
   them and remove 'committed' from the list.
+- TraceParser:
+  Check if GNOME Bugzilla uses mediumint for comment_id column in
+  trace table. If so, add a code porting it to use integer.
diff --git a/TraceParser/Extension.pm b/TraceParser/Extension.pm
index 254e593..ca7305c 100644
--- a/TraceParser/Extension.pm
+++ b/TraceParser/Extension.pm
@@ -196,7 +196,7 @@ sub _handle_dup_to {
     if (!$higher_quality_traces) {
         if ($dup_to->check_can_change_field('longdesc', 0, 1)) {
             my %comment_options = %$comment;
-            my @comment_cols = Bugzilla::Bug::UPDATE_COMMENT_COLUMNS;
+            my @comment_cols = Bugzilla::Comment::UPDATE_COLUMNS;
             foreach my $key (keys %comment_options) {
                 if (!grep { $_ eq $key } @comment_cols) {
                     delete $comment_options{$key};
@@ -289,7 +289,7 @@ sub db_schema_abstract_schema {
         FIELDS => [
             id          => {TYPE => 'MEDIUMSERIAL',  NOTNULL => 1,
                             PRIMARYKEY => 1},
-            comment_id  => {TYPE => 'INT3', NOTNULL => 1,
+            comment_id  => {TYPE => 'INT4', NOTNULL => 1,
                             REFERENCES => {TABLE  => 'longdescs',
                                            COLUMN => 'comment_id',
                                            DELETE => 'CASCADE'}},
diff --git a/TraceParser/lib/Trace.pm b/TraceParser/lib/Trace.pm
index 1239865..5bff007 100644
--- a/TraceParser/lib/Trace.pm
+++ b/TraceParser/lib/Trace.pm
@@ -57,12 +57,6 @@ use constant VALIDATORS => {
     type        => \&_check_type,
 };
 
-use constant REQUIRED_CREATE_FIELDS => qw(
-    comment_id
-    trace_text
-    type
-);
-
 # This is how long a Base64 MD5 Hash is.
 use constant HASH_SIZE => 22;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]