ticket_advs_query_page_fragment dbWhat it does:
make the advanced query page fragmentDefined in: /web/philip/tcl/ticket-defs.tcl
Source code:
set codes {type status priority severity cause} ad_page_variables [ticket_advs_multi_vars advs [concat {pr fa} $codes]] append out "<table><tr><th align=left bgcolor=\"c0c0c0\" colspan=2> Advanced Search</th></tr><tr><td> <input type=submit value=\"Search\"></td></tr>" # plainish text fields append out [text_search_widget -size 50 "Query string:" {} query_string 1] append out [text_search_widget "Ticket title:" advs_ tt 3] append out [text_search_widget -size 30 "Created by<br>(email or name):" advs_ tcrat 1] append out [text_search_widget -size 30 "Assigned to<br>(email or name):" advs_ tasto 1] append out [text_search_widget -size 30 "Closed by<br>(email or name):" advs_ tclby 1] append out [text_search_widget -size 30 -post {<em> (space separated list)</em>} "Ticket ID \#'s:" advs_ ti 1] # project/feature areas append out "<tr><td colspan=2><table>" append out "<td align=left>Project</td><td align=left>Feature area</td></tr><tr>" set select [ad_db_select_widget -size 5 -multiple 1 -default $advs_pr $db "select title_long, project_id from ticket_projects where (end_date > sysdate or end_date is null) order by upper(title_long) asc" advs_pr] append out "<td>$select</td>" set select [ad_db_select_widget -size 5 -multiple 1 -default $advs_fa $db "select title_long, domain_id from ticket_domains where (end_date > sysdate or end_date is null) order by upper(title_long) asc" advs_fa] append out "<td>$select</td>" append out "</tr></table></td></tr>\n" # the codes select substable append out "<tr><td colspan=2><table>" append out "<tr>" foreach code $codes { append out "<td>$code</td>" } append out "<tr>" append out "<tr>" foreach code $codes { append advs_$code {} set select [ad_db_select_widget -size 5 -multiple 1 -default [set advs_$code] $db "select code_long, code_id from ticket_codes_i where code_type = '$code' order by code_seq" advs_$code] append out "<td>$select</td>" } append out "<tr>" append out "</table></td></tr>" # dates subtable append out "<td colspan=2><table>" append out "<tr><td>Creation date:</td><td><table>" append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Greater than or equal to:" advs_ tcge 1] append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Less than or equal to:" advs_ tcle 1] append out "</table></td></tr>" append out "<tr><td>Modification date:</td><td><table>" append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Greater than or equal to:" advs_ tmge 1] append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Less than or equal to:" advs_ tmle 1] append out "</table></td></tr>" append out "<tr><td>Close date:</td><td><table>" append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Greater than or equal to:" advs_ tclge 1] append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Less than or equal to:" advs_ tclle 1] append out "</table></td></tr>" append out "<tr><td>Deadline:</td><td><table>" append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Greater than or equal to:" advs_ tdge 1] append out [text_search_widget -post { (<em>yyyy-mm-dd</em>)} "Less than or equal to:" advs_ tdle 1] append out "</table></td></tr>" append out "</table></td></tr>" append out "</table><blockquote><input type=submit value=Search></blockquote>" return $out