bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

The See Also field is not visible in "Format for Printing"

RESOLVED FIXED in Bugzilla 4.2

Status

()

Bugzilla
User Interface
--
minor
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Frédéric Buclin, Assigned: selsky)

Tracking

4.1.3
Bugzilla 4.2
Bug Flags:
approval +
approval4.2 +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

7 years ago
The URL and other custom fields are visible in the "format for printing" page of a bug, but not the See Also field. It should be included, probably right below the URL field.
(Assignee)

Comment 1

7 years ago
Created attachment 575100 [details] [diff] [review]
Add See Also field to print view, v1
Assignee: ui → selsky
Status: NEW → ASSIGNED
Attachment #575100 - Flags: review?(mkanat)
Comment on attachment 575100 [details] [diff] [review]
Add See Also field to print view, v1

>=== modified file 'template/en/default/bug/show-multiple.html.tmpl'
>--- template/en/default/bug/show-multiple.html.tmpl	2011-01-24 18:29:39 +0000
>+++ template/en/default/bug/show-multiple.html.tmpl	2011-11-17 06:47:27 +0000
>@@ -173,6 +173,24 @@
>       </tr>
>     [% END %]
> 
>+    [% IF bug.see_also %]

Should use bug.see_also.size
(Assignee)

Comment 3

7 years ago
Created attachment 575216 [details] [diff] [review]
Add See Also field to print view, v2
Attachment #575100 - Attachment is obsolete: true
Attachment #575100 - Flags: review?(mkanat)
Attachment #575216 - Flags: review?(mkanat)

Comment 4

7 years ago
Comment on attachment 575216 [details] [diff] [review]
Add See Also field to print view, v2

Review of attachment 575216 [details] [diff] [review]:
-----------------------------------------------------------------

If we're going to copy over the display logic for these, we should instead centralize that logic somewhere--either in a filter, or in a shared template.
Attachment #575216 - Flags: review?(mkanat) → review-
(Reporter)

Comment 5

7 years ago
(In reply to Max Kanat-Alexander from comment #4)
> If we're going to copy over the display logic for these, we should instead
> centralize that logic somewhere--either in a filter, or in a shared template.

Either that or simply paste the whole URL, even for local bugs.
(Reporter)

Updated

7 years ago
Whiteboard: [Good Intro Bug]
Target Milestone: --- → Bugzilla 4.2
(Assignee)

Comment 6

7 years ago
Created attachment 575815 [details] [diff] [review]
Add See Also field to print view, v3

I simplified things:
1) Paste the whole URL, even for local bugs.
2) Don't check for is_safe_url since URLs from Bugzilla::BugURL will be safe.
Attachment #575216 - Attachment is obsolete: true
Attachment #575815 - Flags: review?(mkanat)

Comment 7

7 years ago
Comment on attachment 575815 [details] [diff] [review]
Add See Also field to print view, v3

Review of attachment 575815 [details] [diff] [review]:
-----------------------------------------------------------------

In general I like the simplicity, here. Is there any way to make this just a two-column field somewhere, though? It's not going to take up much width.

::: template/en/default/bug/show-multiple.html.tmpl
@@ +177,5 @@
> +      <tr>
> +        <th>[% field_descs.see_also FILTER html %]:</th>
> +        <td colspan="3">
> +        [% FOREACH see_also = bug.see_also %]
> +          <a href="[% see_also.name FILTER html %]">

That may need to be FILTER url, I believe. LpSolit can confirm one way or another.
(Assignee)

Comment 8

7 years ago
The URL field values are permitted 3 columns.  I don't see why this should be fewer columns; even local bugs are rendered as full URLs.

The filter should be correct.  We're worried about improper embedded HTML-tags, not incorrectly encoded URIs.
(Reporter)

Comment 9

7 years ago
(In reply to Max Kanat-Alexander from comment #7)
> In general I like the simplicity, here. Is there any way to make this just a
> two-column field somewhere, though? It's not going to take up much width.

URLs can be pretty long, and will easily take more than half of the paper width when printed. We should have one URL per line, as we do for the URL field already.


> That may need to be FILTER url, I believe.

No, FILTER html is correct. You use FILTER uri (not url) when you have to filter a parameter in the URL, not the whole URL itself.
(Reporter)

Comment 10

7 years ago
Comment on attachment 575815 [details] [diff] [review]
Add See Also field to print view, v3

>+        <td colspan="3">
>+        [% FOREACH see_also = bug.see_also %]
>+          <a href="[% see_also.name FILTER html %]">
>+                   [% see_also.name FILTER html %]</a><br>
>+        [% END %]
>+        </td>

The indentation is incorrect for the FOREACH block. It should have two additional whitespaces.
Also, <br> should be [% "<br>" IF not loop.last() %] to avoid the last useless <br>.

Both can be fixed on checkin. r=LpSolit
Attachment #575815 - Flags: review?(mkanat) → review+
(Reporter)

Updated

7 years ago
Flags: approval4.2+
Flags: approval+
(Reporter)

Comment 11

7 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/bug/show-multiple.html.tmpl
Committed revision 8064.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified template/en/default/bug/show-multiple.html.tmpl
Committed revision 7999.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.