Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e237b7e7
Commit
e237b7e7
authored
Jan 27, 2011
by
Gervase Markham
Committed by
Gervase Markham
Jan 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow extensions to alter quicksearch terms and search format. r=mkanat.
https://bugzilla.mozilla.org/show_bug.cgi?id=621878
parent
2a5c9e0c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
Hook.pm
Bugzilla/Hook.pm
+15
-0
Quicksearch.pm
Bugzilla/Search/Quicksearch.pm
+2
-0
Extension.pm
extensions/Example/Extension.pm
+8
-0
No files found.
Bugzilla/Hook.pm
View file @
e237b7e7
...
...
@@ -1136,6 +1136,21 @@ Params:
=back
=head2 quicksearch_map
This hook allows you to alter the Quicksearch syntax to include e.g. special
searches for custom fields you have.
Params:
=over
=item C<map> - a hash where the key is the name you want to use in
Quicksearch, and the value is the name from the C<fielddefs> table that you
want it to map to. You can modify existing mappings or add new ones.
=back
=head2 sanitycheck_check
This hook allows for extra sanity checks to be added, for use by
...
...
Bugzilla/Search/Quicksearch.pm
View file @
e237b7e7
...
...
@@ -101,6 +101,8 @@ sub FIELD_MAP {
status_whiteboard
cclist_accessible reporter_accessible)
};
Bugzilla::Hook::
process
(
'quicksearch_map'
,
{
'map'
=>
\%
full_map
}
);
$cache
->
{
quicksearch_fields
}
=
\%
full_map
;
return
$cache
->
{
quicksearch_fields
};
...
...
extensions/Example/Extension.pm
View file @
e237b7e7
...
...
@@ -649,6 +649,14 @@ sub product_end_of_create {
}
}
sub
quicksearch_map
{
my
(
$self
,
$args
)
=
@_
;
my
$map
=
$args
->
{
'map'
};
# This demonstrates adding a shorter alias for a long custom field name.
$map
->
{
'impact'
}
=
$map
->
{
'cf_long_field_name_for_impact_field'
};
}
sub
sanitycheck_check
{
my
(
$self
,
$args
)
=
@_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment