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
42584a88
Commit
42584a88
authored
Mar 19, 2015
by
Albert Ting
Committed by
Byron Jones
Mar 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 342113: Allow custom fields to appear as a discrete field in the search form
r=glob,a=glob
parent
0f01ca16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
query.cgi
query.cgi
+9
-0
form.html.tmpl
template/en/default/search/form.html.tmpl
+13
-0
No files found.
query.cgi
View file @
42584a88
...
@@ -208,6 +208,15 @@ $vars->{'priority'} = Bugzilla::Field->new({name => 'priority'})->legal_values;
...
@@ -208,6 +208,15 @@ $vars->{'priority'} = Bugzilla::Field->new({name => 'priority'})->legal_values;
$vars
->
{
'bug_severity'
}
=
Bugzilla::
Field
->
new
({
name
=>
'bug_severity'
})
->
legal_values
;
$vars
->
{
'bug_severity'
}
=
Bugzilla::
Field
->
new
({
name
=>
'bug_severity'
})
->
legal_values
;
$vars
->
{
'resolution'
}
=
Bugzilla::
Field
->
new
({
name
=>
'resolution'
})
->
legal_values
;
$vars
->
{
'resolution'
}
=
Bugzilla::
Field
->
new
({
name
=>
'resolution'
})
->
legal_values
;
# grab custom fields
my
@custom_fields
=
Bugzilla
->
active_custom_fields
;
$vars
->
{
'custom_fields'
}
=
\
@custom_fields
;
foreach
my
$cf
(
@custom_fields
)
{
if
(
$cf
->
type
==
FIELD_TYPE_SINGLE_SELECT
||
$cf
->
type
==
FIELD_TYPE_MULTI_SELECT
)
{
$vars
->
{
$cf
->
name
}
=
$cf
->
legal_values
;
}
}
# Boolean charts
# Boolean charts
my
@fields
=
@
{
Bugzilla
->
fields
({
obsolete
=>
0
})
};
my
@fields
=
@
{
Bugzilla
->
fields
({
obsolete
=>
0
})
};
...
...
template/en/default/search/form.html.tmpl
View file @
42584a88
...
@@ -127,6 +127,10 @@ TUI_hide_default('information_query');
...
@@ -127,6 +127,10 @@ TUI_hide_default('information_query');
{ field => bug_fields.keywords, accesskey => 'k',
{ field => bug_fields.keywords, accesskey => 'k',
qtypes => ['allwords', 'anywords', 'nowords', 'regexp', 'notregexp'] }
qtypes => ['allwords', 'anywords', 'nowords', 'regexp', 'notregexp'] }
] %]
] %]
[% FOREACH field = custom_fields %]
[% freetext_fields.push({ field => field }) IF field.type == constants.FIELD_TYPE_FREETEXT or field.type == constants.FIELD_TYPE_TEXTAREA %]
[% END %]
[% Hook.process('before_freetext_fields') %]
[% Hook.process('before_freetext_fields') %]
[%# loop through a bunch of free text fields and print out their text stuff %]
[%# loop through a bunch of free text fields and print out their text stuff %]
...
@@ -215,6 +219,15 @@ TUI_hide_default('information_query');
...
@@ -215,6 +219,15 @@ TUI_hide_default('information_query');
accesskey =>"o"
accesskey =>"o"
value => default.op_sys
value => default.op_sys
%]
%]
[% FOREACH field = custom_fields %]
[% IF field.type == constants.FIELD_TYPE_SINGLE_SELECT or
field.type == constants.FIELD_TYPE_MULTI_SELECT %]
[% INCLUDE "search/field.html.tmpl"
field => field
value => default.${field.name}
%]
[% END %]
[% END %]
[% Hook.process('after_selects_bottom') %]
[% Hook.process('after_selects_bottom') %]
</div>
</div>
</div>
</div>
...
...
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