Can anyone tell me if the search function in version 1.0(+) looks at custom fields?
I'm using a 0.18 version and don't have access to anything more recent.
Search Filter
Moderators: Developer, Contributor
-
- Posts: 7
- Joined: 09 Sep 2005, 19:06
apparently so
was trying to figure out if its possible to enter a boolean expression in the search field to limit all the matches (so far no luck) anyone?
Heres something from the manual: -- The Search field will look for simple keyword matches in the summary, description, steps to reproduce, additional information, bug id, or bug text id fields. It does not search through bugnotes...
...however, i did come across (if its not already too late) an apparent solution for the question raised in this thread (havent yet tried it myself):
---- http://manual.mantisbt.org/manual.page. ... s.page.php ----
#I'm currently using a customized version 0.18.0rc1 of Mantis.
#Allthough I don't know if it is meanwhile possible to use filter search
#over custom fields too in newer versions, here is my solution to make
#it possible:
#You need 3 changes in core/filter_api.php in
function filter_get_bug_rows(.....
#on top of this function add:
$t_custom_field_project_table=config_get('mantis_custom_field_project_table');
$t_custom_field_string_table=config_get('mantis_custom_field_string_table');
#then change
#array_push( $t_where_clauses,
#"((summary LIKE '%$c_search%')
# OR ($t_bug_text_table.description LIKE '%$c_search%')
# OR ($t_bug_text_table.steps_to_reproduce LIKE '%$c_search%')
# OR ($t_bug_text_table.additional_information LIKE '%$c_search%')
# OR ($t_bug_table.id LIKE '%$c_search%')
# OR ($t_bugnote_text_table.note LIKE '%$c_search%'))" ) ;
#
#by:
array_push( $t_where_clauses,
"((summary LIKE '%$c_search%')
OR ($t_bug_text_table.description LIKE '%$c_search%')
OR ($t_bug_text_table.steps_to_reproduce LIKE '%$c_search%')
OR ($t_bug_text_table.additional_information LIKE '%$c_search%')
OR ($t_bug_table.id LIKE '%$c_search%')
OR ($t_bugnote_text_table.note LIKE '%$c_search%')
OR ($t_custom_field_string_table.value LIKE '%$c_search%')
; )" ) ;
# as you see the -OR- part with $t_custom_field_string_table is new
#
# then add a new JOIN clause:
array_push( $t_join_clauses,"LEFT JOIN $t_custom_field_string_table ON $t_custom_field_string_table.bug_id = $t_bug_table.id"; ) ;
# that's all
# injoy,
# regards, Johannes Heinz
Heres something from the manual: -- The Search field will look for simple keyword matches in the summary, description, steps to reproduce, additional information, bug id, or bug text id fields. It does not search through bugnotes...
...however, i did come across (if its not already too late) an apparent solution for the question raised in this thread (havent yet tried it myself):
---- http://manual.mantisbt.org/manual.page. ... s.page.php ----
#I'm currently using a customized version 0.18.0rc1 of Mantis.
#Allthough I don't know if it is meanwhile possible to use filter search
#over custom fields too in newer versions, here is my solution to make
#it possible:
#You need 3 changes in core/filter_api.php in
function filter_get_bug_rows(.....
#on top of this function add:
$t_custom_field_project_table=config_get('mantis_custom_field_project_table');
$t_custom_field_string_table=config_get('mantis_custom_field_string_table');
#then change
#array_push( $t_where_clauses,
#"((summary LIKE '%$c_search%')
# OR ($t_bug_text_table.description LIKE '%$c_search%')
# OR ($t_bug_text_table.steps_to_reproduce LIKE '%$c_search%')
# OR ($t_bug_text_table.additional_information LIKE '%$c_search%')
# OR ($t_bug_table.id LIKE '%$c_search%')
# OR ($t_bugnote_text_table.note LIKE '%$c_search%'))" ) ;
#
#by:
array_push( $t_where_clauses,
"((summary LIKE '%$c_search%')
OR ($t_bug_text_table.description LIKE '%$c_search%')
OR ($t_bug_text_table.steps_to_reproduce LIKE '%$c_search%')
OR ($t_bug_text_table.additional_information LIKE '%$c_search%')
OR ($t_bug_table.id LIKE '%$c_search%')
OR ($t_bugnote_text_table.note LIKE '%$c_search%')
OR ($t_custom_field_string_table.value LIKE '%$c_search%')
; )" ) ;
# as you see the -OR- part with $t_custom_field_string_table is new
#
# then add a new JOIN clause:
array_push( $t_join_clauses,"LEFT JOIN $t_custom_field_string_table ON $t_custom_field_string_table.bug_id = $t_bug_table.id"; ) ;
# that's all
# injoy,
# regards, Johannes Heinz