Closed Bug 816333 Opened 13 years ago Closed 13 years ago

Bug IDs in the "Change Votes" page are no longer linkified

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: alice0775, Assigned: glob)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

This problem happens since few days ago. Str Open Voting page Actual results: No link to individual bug# Expected results: Bug# should be link to the bug
Confirming. This must have happened 1-2 days ago.
Assignee: website → nobody
Component: bugzilla.org → General
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa
Version: unspecified → Production
Assignee: nobody → glob
this is caused by bug 811280 (which was backported to bmo in bug 814411). the voting extension passes in a bug object from the template to get_bug_link, which isn't expected because it isn't blessed (it's a hashref).
Component: General → Bugzilla-General
Depends on: 814411
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Summary: No link to the bug# in Change Votes → Bugzilla::Object cache caused bugs on the "change votes" page to look their link
Target Milestone: --- → Bugzilla 5.0
Version: Production → unspecified
Attached patch patch v1 (obsolete) — Splinter Review
Attachment #686980 - Flags: review?(LpSolit)
Comment on attachment 686980 [details] [diff] [review] patch v1 Review of attachment 686980 [details] [diff] [review]: ----------------------------------------------------------------- Works for me r=dkl
Attachment #686980 - Flags: review+
Flags: approval?
Comment on attachment 686980 [details] [diff] [review] patch v1 >- $bug = new Bugzilla::Bug({ id => $bug, cache => 1 }); >+ $bug = new Bugzilla::Bug({ id => ref($bug) ? $bug->{id} : $bug, >+ cache => 1 }); (In reply to Byron Jones ‹:glob› from comment #2) > the voting extension passes in a bug object from the template to > get_bug_link, which isn't expected because it isn't blessed (it's a hashref). "which isn't expected" means that the Voting extension should be fixed instead. Else this means that you can pass either a bug ID, or a bug hashref or a bug object to get_bug_link(). This looks like a pretty bad design. We should only pass a bug object or a bug ID. You should rather fix extensions/Voting/template/en/default/pages/voting/user.html.tmpl and replace [% bug.id FILTER bug_link(bug) FILTER none %] by [% bug.id FILTER bug_link(bug.id) FILTER none %] I don't want to change how a core method works just because an extension is unable to pass expected arguments.
Attachment #686980 - Flags: review?(LpSolit) → review-
The culprit is not the cache used by Bugzilla::Object. It's the Voting extension which doesn't pass expected arguments to bug_link().
Flags: approval?
OS: Windows 7 → All
Hardware: x86 → All
Summary: Bugzilla::Object cache caused bugs on the "change votes" page to look their link → Bug IDs in the "Change Votes" page are no longer linkified
Attached patch patch v2Splinter Review
this revision updates the voting extension only.
Attachment #687650 - Flags: review?(LpSolit)
Keywords: relnote
relnote: currently extensions can pass in a bug "object" from a template to get_bug_link. with this change they will have to provide bug.id instead.
Comment on attachment 687650 [details] [diff] [review] patch v2 >=== modified file 'extensions/Voting/template/en/default/pages/voting/bug.html.tmpl' >- [% "$terms.Bug $bug.id" FILTER bug_link(bug) FILTER none %] - [% bug.short_desc FILTER html %] >+ [% "$terms.Bug $bug.id" FILTER bug_link(bug.id) FILTER none %] - [% bug.short_desc FILTER html %] This change is not needed. This template gets a real Bugzilla::Bug object, so this is fine. Only voting/user.html.tmpl must be fixed. r=LpSolit with this change reverted.
Attachment #687650 - Flags: review?(LpSolit) → review+
Flags: approval+
Attachment #686980 - Attachment is obsolete: true
(In reply to Byron Jones ‹:glob› from comment #8) > relnote: currently extensions can pass in a bug "object" from a template to > get_bug_link. with this change they will have to provide bug.id instead. A Bugzilla::Bug object is fine. What is not fine is a hash trying to simulate a bug object by having id as key.
Status: NEW → ASSIGNED
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/ modified extensions/Voting/template/en/default/pages/voting/user.html.tmpl Committed revision 8506.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
This is considered being pushed on the weekly(?) BMO Pushday, right? :)
(In reply to XtC4UaLL [:xtc4uall] from comment #12) > This is considered being pushed on the weekly(?) BMO Pushday, right? :) Yep. It will be included in the next BMO code push later this week. http://bzr.mozilla.org/bmo/4.0/revision/8408 dkl
Depends on: 811280
No longer depends on: 814411
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: