]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 937180: creation_ts of bugs and attachments always at 0 seconds
authorByron Jones <bjones@mozilla.com>
Mon, 18 Nov 2013 14:24:39 +0000 (22:24 +0800)
committerByron Jones <bjones@mozilla.com>
Mon, 18 Nov 2013 14:24:39 +0000 (22:24 +0800)
r=dkl, a=simon

Bugzilla/Attachment.pm
Bugzilla/Bug.pm
template/en/default/attachment/list.html.tmpl
template/en/default/bug/edit.html.tmpl

index 92e05e6064c72b2a5abfd2152701db5d1367f1a6..ef47856331c04ff8cde88ef909332c1950f32c4b 100644 (file)
@@ -59,22 +59,19 @@ use constant LIST_ORDER => ID_FIELD;
 use constant AUDIT_CREATES => 0;
 use constant AUDIT_UPDATES => 0;
 
-sub DB_COLUMNS {
-    my $dbh = Bugzilla->dbh;
-
-    return qw(
-        attach_id
-        bug_id
-        description
-        filename
-        isobsolete
-        ispatch
-        isprivate
-        mimetype
-        modification_time
-        submitter_id),
-        $dbh->sql_date_format('attachments.creation_ts', '%Y.%m.%d %H:%i') . ' AS creation_ts';
-}
+use constant DB_COLUMNS => qw(
+    attach_id
+    bug_id
+    creation_ts
+    description
+    filename
+    isobsolete
+    ispatch
+    isprivate
+    mimetype
+    modification_time
+    submitter_id
+);
 
 use constant REQUIRED_FIELD_MAP => {
     bug_id => 'bug',
index 88f1f18bcad30f9f7e05b7bc0390d87a3844c3c8..1e82da30db26b84ab540d8f500f448d7cf0b4d43 100644 (file)
@@ -71,6 +71,7 @@ sub DB_COLUMNS {
         bug_status
         cclist_accessible
         component_id
+        creation_ts
         delta_ts
         estimated_time
         everconfirmed
@@ -89,7 +90,6 @@ sub DB_COLUMNS {
         version
     ),
     'reporter    AS reporter_id',
-    $dbh->sql_date_format('creation_ts', '%Y.%m.%d %H:%i') . ' AS creation_ts',
     $dbh->sql_date_format('deadline', '%Y-%m-%d') . ' AS deadline',
     @custom_names);
     
index 9c92479800833d48a565d3946c6c59434414c4a2..48921e3caa087071d5469769a1cd53abd9ed1954 100644 (file)
@@ -88,7 +88,7 @@ function toggle_display(link) {
             <br>
             <a href="#attach_[% attachment.id %]"
                title="Go to the comment associated with the attachment">
-              [%- attachment.attached FILTER time %]</a>,
+              [%- attachment.attached FILTER time("%Y-%m-%d %H:%M %Z") %]</a>,
 
             [%# No need to recreate the exact same template if we already have it. %]
             [% attacher_id = attachment.attacher.id %]
index acdcdbf7aaefb5c2ed8ee97630049298caefadee..a6857f0d5d07d9f1c02cd497539f7e0905275920 100644 (file)
       Reported:
     </th>
     <td>
-     [% bug.creation_ts FILTER time %] by [% INCLUDE global/user.html.tmpl who = bug.reporter %]
+     [% bug.creation_ts FILTER time("%Y-%m-%d %H:%M %Z") %] by [% INCLUDE global/user.html.tmpl who = bug.reporter %]
     </td>
   </tr>
   
       Modified:
     </th>
     <td>
-      [% bug.delta_ts FILTER time FILTER replace(':\d\d$', '') FILTER replace(':\d\d ', ' ')%] 
+      [% bug.delta_ts FILTER time("%Y-%m-%d %H:%M %Z") %]
       (<a href="show_activity.cgi?id=[% bug.bug_id %]">[%# terms.Bug %]History</a>)
     </td>