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.

try to use bug_link more

RESOLVED DUPLICATE of bug 115796

Status

()

Bugzilla
User Interface
--
enhancement
RESOLVED DUPLICATE of bug 115796
13 years ago
12 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

17.80 KB, patch
Frédéric Buclin
: review-
Details | Diff | Splinter Review
(Assignee)

Description

13 years ago
lpsolit claims we should be using bug_link, but we don't use it much...
(Assignee)

Comment 1

13 years ago
Created attachment 214139 [details] [diff] [review]
changes to use bug_link
Attachment #214139 - Flags: review?(LpSolit)
See also bug 318265.

Comment 3

13 years ago
Comment on attachment 214139 [details] [diff] [review]
changes to use bug_link

./runtests.pl 008 fails:

filterexceptions.pl has extra members: ...

t/008filter........NOK 148
#     Failed test (t/008filter.t at line 142)
t/008filter........NOK 149
#     Failed test (t/008filter.t at line 142)
t/008filter........NOK 150
#     Failed test (t/008filter.t at line 142)
t/008filter........NOK 155
#     Failed test (t/008filter.t at line 142)
t/008filter........NOK 165
#     Failed test (t/008filter.t at line 142)
t/008filter........NOK 167
#     Failed test (t/008filter.t at line 142)
t/008filter........NOK 243
#     Failed test (t/008filter.t at line 142)
# Looks like you failed 7 tests of 261.


>Index: mozilla/webtools/bugzilla/template/en/default/bug/navigate.html.tmpl

>+  [%+ First FILTER bug_link(bug_list.first) FILTER none %]
>+  [%+ Last FILTER bug_link(bug_list.last) FILTER none %]

"First" and "Last" must be quoted, because they are text, not variables. Moreover, you should use bug_link() for "Prev" and "Next" too.



>Index: mozilla/webtools/bugzilla/template/en/default/bug/show.html.tmpl

>+    [%+ bug.bug_id" FILTER bug_link(bug.bug_id) FILTER none %]:

Remove the quote after bug.bug_id. This makes checksetup.pl to crash.



>Index: mozilla/webtools/bugzilla/template/en/default/bug/summarize-time.html.tmpl

>+    [% "<b>$terms.Bug&nbsp; $id</b>" FILTER bug_link(id) FILTER none %]

You have to remove the whitespace between &nbsp; and $id, else you get "Bug foo" on two lines.


I didn't check whether there are other places where bug_link() should be used too. I will let you do this check.
Attachment #214139 - Flags: review?(LpSolit) → review-

Updated

13 years ago
Severity: normal → enhancement
Status: NEW → ASSIGNED
OS: MacOS X → All
Hardware: Macintosh → All
Target Milestone: --- → Bugzilla 2.24
(Assignee)

Comment 4

12 years ago
Created attachment 217539 [details] [diff] [review]
more changes

i have no idea how filter works when you have foo.$bar. which is why i didn't mess w/ Prev/Next.

I also don't have bugzilla or any intention of installing it in order to get the suite happy. if your suite doesn't like me, give me a list of changes it wants made and i'll make them.

i have hundreds of other things to do with my time.
Attachment #214139 - Attachment is obsolete: true
Attachment #217539 - Flags: review?(LpSolit)

Comment 5

12 years ago
Comment on attachment 217539 [details] [diff] [review]
more changes

>Index: mozilla/webtools/bugzilla/template/en/default/admin/products/updated.html.tmpl

>+      &rarr;removed votes for [% terms.bug %]
>+      [%+ detail.id FILTER bug_link(detail.id) FILTER none %]
>+      from [% detail.name FILTER html %]<br>

>+      &rarr;removed votes for [% terms.bug %]
>+      [%+ detail.id FILTER bug_link(detail.id) FILTER none %]
>+      from [% detail.name FILTER html %]<br>

We should be consistent: in some files, "Bug" is included in the link, sometimes only the bug number is. From a UI point of view, I prefer to include "Bug" as well, everywhere.



>Index: mozilla/webtools/bugzilla/template/en/default/attachment/created.html.tmpl

>+<a href="attachment.cgi?bugid=[% bugid FILTER none %]&amp;action=enter">Create
>+ Another Attachment to 
>+  [%+ "$terms.Bug #$bugid" FILTER bug_link(bugid) FILTER none %]</a>

I don't like having a link in a link. This link should entirely point to the attachment, not the bug ID (we already have another link which points to the bug).



>Index: mozilla/webtools/bugzilla/template/en/default/bug/navigate.html.tmpl
>+  [%+ "First" FILTER bug_link(bug_list.first) FILTER none %]
>+  [%+ "Last" FILTER bug_link(bug_list.last) FILTER none %]
>+        [% "Prev" FILTER bug_link(bug_list.$prev_bug) FILTER none %]
>+        [% "Next" FILTER bug_link(bug_list.$next_bug) FILTER none %]

Technically, that's correct. The problem is that if they point to a closed bug, these URLs will be crossed out, which isn't nice from a UI point of view. I would r+ your patch if we could avoid this behavior. That's the only reason I denied review (I could r+ your patch if bug_link() was fixed accordingly).
Attachment #217539 - Flags: review?(LpSolit) → review-

Comment 6

12 years ago

*** This bug has been marked as a duplicate of 115796 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
Target Milestone: Bugzilla 3.0 → ---
You need to log in before you can comment on or make changes to this bug.