return \@comments;
}
+sub master_bug {
+ my $self = shift;
+ return undef if $self->{'error'};
+ $self->{'master_bug_obj'} ||= new Bugzilla::Bug($self->master_bug_id);
+ return $self->{'master_bug_obj'};
+}
+
sub new_bug_statuses {
my ($class, $product) = @_;
my $user = Bugzilla->user;
white-space: normal !important;
}
-/* Style of the attachment table and time tracking table */
-#attachment_table {
+/* Style of the attachment table, sightings table and time tracking table */
+#attachment_table, #sighting_table {
border-collapse: collapse;
border: 1px solid #333333;
+ margin: 2ex 0;
}
-#attachment_table th, .bz_attach_footer, .bz_time_tracking_table th {
+#attachment_table th, .bz_attach_footer, .bz_sighting_table th,
+.bz_sighting_footer, .bz_time_tracking_table th {
background-color: #E0E0E0;
color: black;
+ padding: 0.5em;
}
-#attachment_table td, .bz_time_tracking_table th, .bz_time_tracking_table td {
+#attachment_table td, .bz_sighting_table th, .bz_sighting_table td,
+.bz_time_tracking_table th, .bz_time_tracking_table td {
border: 1px solid #333333;
+ padding: 0.5em;
+}
+
+#sighting_table td {
+ text-align: center;
}
.bz_attach_extra_info {
//-->
</script>
-<br>
<table id="attachment_table" cellspacing="0" cellpadding="4">
<tr id="a0">
<th colspan="[% show_attachment_flags ? 3 : 2 %]" align="left">
</td>
</tr>
</table>
-<br>
<table id="bz_big_form_parts" cellspacing="0" cellpadding="0"><tr>
<td>
+ [%# *** Sightings *** %]
+
+ [% PROCESS sighting/list.html.tmpl
+ bug = bug
+ %]
+
[% IF user.is_timetracker %]
[% PROCESS section_timetracking %]
[% END %]
</td>
<td id="bz_field_status">
<span id="static_bug_status">
- [% display_value("bug_status", bug.bug_status) FILTER html %]
- [% IF bug.resolution %]
- [%+ display_value("resolution", bug.resolution) FILTER html %]
- [% IF bug.dup_id %]
- of [% "${terms.bug} ${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %]
- [% END %]
- [% END %]
+ [% PROCESS bug/status.html.tmpl target = bug %]
[% IF bug.user.canedit || bug.user.isreporter %]
(<a href="#add_comment"
onclick="window.setTimeout(function() { document.getElementById('bug_status').focus(); }, 10)">edit</a>)
--- /dev/null
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Riverbed Technology
+ # Portions created by the Initial Developer are Copyright (C) 2011 the
+ # Initial Developer. All Rights Reserved.
+ #
+ # Contributor(s): Robert Webb <rowebb@gmail.com>
+ #%]
+
+[%# INTERFACE:
+ # target: Bugzila::Bug; the bug to render the status of.
+ #%]
+
+[% display_value("bug_status", target.bug_status) FILTER html %]
+[% IF target.resolution %]
+ [%+ display_value("resolution", target.resolution) FILTER html %]
+ [% IF target.dup_id %]
+ of [% "${terms.bug} ${target.dup_id}" FILTER bug_link(target.dup_id) FILTER none %]
+ [% END %]
+[% END %]
"setting" => "Setting",
"settings" => "Settings",
"short_desc" => "Summary",
+ "sighting" => "Sighting",
"status_whiteboard" => "Whiteboard",
"tag.name" => "Tags",
"target_milestone" => "Target Milestone",
--- /dev/null
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Riverbed Technology
+ # Portions created by the Initial Developer are Copyright (C) 2011 the
+ # Initial Developer. All Rights Reserved.
+ #
+ # Contributor(s): Robert Webb <rowebb@gmail.com>
+ #%]
+
+[%# INTERFACE:
+ # bug: Bugzila::Bug; the master bug of the sightings to list.
+ #%]
+
+[% master_bug = bug %]
+[% IF bug.master_bug_id %]
+ [% master_bug = bug.master_bug %]
+[% END %]
+
+[% sightings = master_bug.sightings %]
+[% IF sightings.size == 0 %]
+ [% RETURN %]
+[% END %]
+<table id="sighting_table" class="bz_sighting_table">
+ <tr>
+ <th>
+ [% field_descs.sighting FILTER html %]
+ </th>
+ <th>
+ [% field_descs.bug_status FILTER html %]
+ </th>
+ </tr>
+
+ [% PROCESS render_sighting_row target = master_bug tag = "th" %]
+
+ [% FOREACH sighting = sightings %]
+ [% PROCESS render_sighting_row target = sighting tag = "td" %]
+ [% END %]
+</table>
+
+[% BLOCK render_sighting_row %]
+ <tr id="s[% target.id FILTER html %]">
+ <[% tag %]>
+ [% target.bug_id FILTER bug_link(target) FILTER none %]
+ </[% tag %]>
+ <[% tag %]>
+ [% PROCESS bug/status.html.tmpl %]
+ </[% tag %]>
+ </tr>
+[% END %]