Closed Bug 743991 Opened 12 years ago Closed 12 years ago

Need a new hook to update Bugzilla::Search::COLUMN_JOINS

Categories

(Bugzilla :: Extensions, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: aliustek, Assigned: aliustek)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Column Joins Hook (obsolete) — Splinter Review
Need a new hook to update Search.pm COLUMN_JOINS to make Testopia work with 4.2
Attachment #613587 - Flags: review?(LpSolit)
Comment on attachment 613587 [details] [diff] [review]
Column Joins Hook

>=== modified file 'Bugzilla/Hook.pm'

>+=head2 search_column_joins

For consistency with other hooks, it should be named buglist_column_joins.


>+See L<Bugzilla::Search/COLUMN_JOINS> for reference and see
>+the code in the example extension.

This is not an optimal description. You shouldn't have to look at the internals of Bugzilla to understand what to do. I was working on this too, so I will attach what I wrote so that you can reuse it.



>=== modified file 'extensions/Example/Extension.pm'

>+sub search_columns_joins {

A working example would be better. I will attach what I wrote.


Globally looks good. :)
Attachment #613587 - Flags: review?(LpSolit) → review-
Status: NEW → ASSIGNED
Summary: Request: Need a new hook to update search COLUMN_JOINS → Need a new hook to update search COLUMN_JOINS
Target Milestone: --- → Bugzilla 4.2
Attached patch WIP (obsolete) — Splinter Review
This is the patch I was working on. Yours has the advantage to cache the data, so this is a good idea. I'm simply attaching my patch so that you can copy the description for the hook, as well as a working example for the Example extension. You will have to adapt it slightly to match your hook, but you get the idea.
Attachment #613587 - Attachment is obsolete: true
Attachment #613598 - Attachment is obsolete: true
Attachment #613635 - Flags: review?(LpSolit)
Comment on attachment 613635 [details] [diff] [review]
Column Joins Hook v2

>=== modified file 'Bugzilla/Hook.pm'

>+=item C<field> - A read-only string with the name of the column.

There is no "field" argument in this hook.


>+L<Bugzilla::Search>. This hasref contains names of the columns as keys and 

s/hasref/hashref/.


>=== removed file 'extensions/Example/disabled'

Must be removed from the patch.


Your patch works fine, thanks. r=LpSolit

I will fix some nits on checkin.
Attachment #613635 - Flags: review?(LpSolit) → review+
Flags: approval4.2+
Flags: approval+
Keywords: relnote
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Hook.pm
modified Bugzilla/Search.pm
modified extensions/Example/Extension.pm
Committed revision 8177.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Hook.pm
modified Bugzilla/Search.pm
modified extensions/Example/Extension.pm
Committed revision 8064.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Summary: Need a new hook to update search COLUMN_JOINS → Need a new hook to update Bugzilla::Search::COLUMN_JOINS
Added to relnotes for 4.2.1.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.