]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Make Target Milestone field have the same maximum length as Version field. r,a=LpSolit.
authorGervase Markham <gerv@gerv.net>
Mon, 26 Mar 2012 11:12:37 +0000 (12:12 +0100)
committerGervase Markham <gerv@mozilla.org>
Mon, 26 Mar 2012 11:12:37 +0000 (12:12 +0100)
https://bugzilla.mozilla.org/show_bug.cgi?id=448551

Bugzilla/Constants.pm
Bugzilla/DB/Schema.pm
Bugzilla/Install/DB.pm
template/en/default/admin/milestones/create.html.tmpl
template/en/default/admin/milestones/edit.html.tmpl
template/en/default/admin/products/edit-common.html.tmpl

index 6ce19ad3c1090deecad566250ee6468471728fed..279405c748b4e17269fa7bb13d2d9cc261a3d0eb 100644 (file)
@@ -524,7 +524,7 @@ use constant MAX_CLASSIFICATION_SIZE => 64;
 use constant MAX_PRODUCT_SIZE => 64;
 
 # The longest milestone name allowed.
-use constant MAX_MILESTONE_SIZE => 20;
+use constant MAX_MILESTONE_SIZE => 64;
 
 # The longest component name allowed.
 use constant MAX_COMPONENT_SIZE => 64;
index 9267a3feaadf6dbebb35b39c53a01f6ced199e5b..4c89b18707fce9c06445d1098b41c69543d19b21 100644 (file)
@@ -257,7 +257,7 @@ use constant ABSTRACT_SCHEMA => {
                                                    COLUMN => 'id'}},
             resolution          => {TYPE => 'varchar(64)',
                                     NOTNULL => 1, DEFAULT => "''"},
-            target_milestone    => {TYPE => 'varchar(20)',
+            target_milestone    => {TYPE => 'varchar(64)',
                                     NOTNULL => 1, DEFAULT => "'---'"},
             qa_contact          => {TYPE => 'INT3',
                                     REFERENCES => {TABLE  => 'profiles',
@@ -748,7 +748,7 @@ use constant ABSTRACT_SCHEMA => {
                            REFERENCES => {TABLE  => 'products',
                                           COLUMN => 'id',
                                           DELETE => 'CASCADE'}},
-            value      => {TYPE => 'varchar(20)', NOTNULL => 1},
+            value      => {TYPE => 'varchar(64)', NOTNULL => 1},
             sortkey    => {TYPE => 'INT2', NOTNULL => 1,
                            DEFAULT => 0},
             isactive   => {TYPE => 'BOOLEAN', NOTNULL => 1, 
@@ -1288,7 +1288,7 @@ use constant ABSTRACT_SCHEMA => {
             description       => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
             isactive          => {TYPE => 'BOOLEAN', NOTNULL => 1,
                                   DEFAULT => 1},
-            defaultmilestone  => {TYPE => 'varchar(20)',
+            defaultmilestone  => {TYPE => 'varchar(64)',
                                   NOTNULL => 1, DEFAULT => "'---'"},
             allows_unconfirmed => {TYPE => 'BOOLEAN', NOTNULL => 1,
                                    DEFAULT => 'TRUE'},
index 5bd8fc79031a67e56eb02ded74dd2d6fd613f90c..fc8394d91e73b45a4244df1f486f8a47c2607db1 100644 (file)
@@ -1,4 +1,4 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
+11# This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
@@ -180,15 +180,6 @@ sub update_table_definitions {
 
     _populate_milestones_table();
 
-    # 2000-03-22 Changed the default value for target_milestone to be "---"
-    # (which is still not quite correct, but much better than what it was
-    # doing), and made the size of the value field in the milestones table match
-    # the size of the target_milestone field in the bugs table.
-    $dbh->bz_alter_column('bugs', 'target_milestone',
-        {TYPE => 'varchar(20)', NOTNULL => 1, DEFAULT => "'---'"});
-    $dbh->bz_alter_column('milestones', 'value',
-                          {TYPE => 'varchar(20)', NOTNULL => 1});
-
     _add_products_defaultmilestone();
 
     # 2000-03-24 Added unique indexes into the cc and keyword tables.  This
@@ -666,6 +657,15 @@ sub update_table_definitions {
         $dbh->bz_add_index('profile_search', 'profile_search_user_id_idx', [qw(user_id)]);
     }
 
+    # 2012-03-23 LpSolit@gmail.com - Bug 448551
+    $dbh->bz_alter_column('bugs', 'target_milestone',
+                          {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'---'"});
+
+    $dbh->bz_alter_column('milestones', 'value', {TYPE => 'varchar(64)', NOTNULL => 1});
+
+    $dbh->bz_alter_column('products', 'defaultmilestone',
+                          {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'---'"});
+
     ################################################################
     # New --TABLE-- changes should go *** A B O V E *** this point #
     ################################################################
index 50380116499b3ef8c17b381d6c2a1a1e7d488d1d..8006c0cd013156fc86ee96b68aea106672790069 100644 (file)
@@ -24,7 +24,7 @@
   <table border="0" cellpadding="4" cellspacing="0">
     <tr>
       <th align="right"><label for="milestone">Milestone:</label></th>
-      <td><input id="milestone" size="20" maxlength="20" name="milestone"
+      <td><input id="milestone" size="64" maxlength="64" name="milestone"
                  value=""></td>
     </tr>
     <tr>
index 432de5d8d472bbfc419aa9699cb912b1d56948b3..759bd708a61ba5978e62b1a28fdeff772506000a 100644 (file)
@@ -25,7 +25,7 @@
 
     <tr>
       <th class="field_label"><label for="milestone">Milestone:</label></th>
-      <td><input id="milestone" size="20" maxlength="20" name="milestone" value="
+      <td><input id="milestone" size="64" maxlength="64" name="milestone" value="
       [%- milestone.name FILTER html %]"></td>
     </tr>
     <tr>
index 615f61fc759304095adc6069953026e9b8ce4fa6..2b76c44ac9cbc558868372f59fd2f157388f21b2 100644 (file)
@@ -62,7 +62,7 @@
           [% END %]
         </select>
       [% ELSE %]
-        <input type="text" size="20" maxlength="20" name="defaultmilestone"
+        <input type="text" size="64" maxlength="64" name="defaultmilestone"
                value="[% product.defaultmilestone FILTER html %]">
       [% END %]
     </td>