summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormark <mark>2011-02-18 01:24:56 +0000
committermark <mark>2011-02-18 01:24:56 +0000
commit9f8decd5ee70e747cd3cec1e0eb917b5493f12e2 (patch)
tree643da64aac3538ed581d29f710f0cf4c83d42e21
parent545e6b27bc390b7fd898fcac32a4d1686249b7a6 (diff)
option to include resolved tickets in search, RT#11658
-rw-r--r--rt/FREESIDE_MODIFIED24
-rw-r--r--rt/etc/RT_Config.pm.in10
-rw-r--r--rt/lib/RT/Search/Googleish.pm12
3 files changed, 33 insertions, 13 deletions
diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED
index be645f270..6bef539be 100644
--- a/rt/FREESIDE_MODIFIED
+++ b/rt/FREESIDE_MODIFIED
@@ -7,13 +7,15 @@ config.layout.in
etc/schema.Pg
etc/schema.mysql-4.1
+lib/RT/Attribute_Overlay.pm #bugfix
lib/RT/Config.pm
lib/RT/CustomField.pm #CheckMandatoryFields
-lib/RT/CustomField_Overlay.pm #customfield date patch
-lib/RT/Interface/Web.pm #customfield date patch
+lib/RT/CustomField_Overlay.pm #customfield date patch #timeworked custom fields
+lib/RT/Interface/Web.pm #customfield date patch #fix transaction custom fields
lib/RT/Action.pm #create ticket on custom field change
lib/RT/Condition.pm #create ticket on custom field change
lib/RT/Scrip_Overlay.pm #create ticket on custom field change
+lib/RT/Action/Accumulate.pm #timeworked custom fields
lib/RT/Action/CreateTickets.pm #create ticket on custom field change
lib/RT/Action/EscalatePriority.pm #ticket escalation
lib/RT/Action/EscalateQueue.pm #ticket escalation
@@ -22,12 +24,13 @@ lib/RT/CustomFieldValues/Queues.pm #ticket escalation
lib/RT/Condition/CustomFieldChange.pm #create ticket on custom field change
lib/RT/Interface/Web_Vendor.pm
lib/RT/Interface/Web/Handler.pm #freeside comp_root for dashboard emails
- lib/RT/Record.pm #and customfield date patch
+ lib/RT/Record.pm #and customfield date patch #fix transaction custom fields
lib/RT/SavedSearches_Local.pm #saved searches
+lib/RT/Search/Googleish.pm #option to include resolved tickets
lib/RT/SearchBuilder.pm #need DBIx::SearchBuilder >= 1.36 for Pg 8.1+
-lib/RT/Transaction_Overlay.pm
-lib/RT/Tickets_Overlay.pm #customfield date patch #SearchCustomerFields #this-month condition
- lib/RT/Ticket_Overlay.pm
+lib/RT/Transaction_Overlay.pm #fix transaction custom fields
+lib/RT/Tickets_Overlay.pm #customfield date patch #SearchCustomerFields #this-month condition
+ lib/RT/Ticket_Overlay.pm #fix transaction custom fields
lib/RT/Users_Overlay.pm
lib/RT/Groups_Overlay.pm
lib/RT/Date.pm #this-month condition
@@ -52,7 +55,8 @@ share/html/Ticket/Create.html # queue select dropdown on Ticket/Create
share/html/autohandler #Footer getting appended where unwelcome
share/html/index.html #option to redirect to ticket display on quick create
- share/html/Admin/CustomFields/Modify.html #CheckMandatoryFields
+ share/html/Admin/CustomFields/Modify.html #CheckMandatoryFields #timeworked custom fields
+share/html/Admin/Elements/EditCustomFieldUILocation #timeworked custom fields
share/html/Admin/Elements/EditScrip #create ticket on custom field change
share/html/Admin/Elements/EditScripOptions #create ticket on custom field change
share/html/Admin/Elements/SelectScripAction #create ticket on custom field change
@@ -60,6 +64,7 @@ share/html/Ticket/Create.html # queue select dropdown on Ticket/Create
share/html/Admin/Users/Modify.html
share/html/Elements/CollectionList
share/html/Elements/EditCustomFieldDate #customfield date patch (NEW)
+share/html/Elements/EditCustomFieldTimeValue #timeworked custom fields
share/html/Elements/Header
share/html/Elements/PageLayout
#html/Elements/QuickCreate
@@ -67,6 +72,7 @@ share/html/Elements/EditCustomFieldDate #customfield date patch (NEW)
share/html/Elements/RT__SavedSearch/ColumnMap #saved searches
share/html/Elements/SavedSearches #saved searches
share/html/Elements/ShowCustomFieldDate #customfield date patch (NEW)
+share/html/Elements/ShowCustomFieldTimeValue #timeworked custom fields
share/html/Elements/SelectDate
share/html/Elements/ShowLink_Checklist
share/html/Elements/ShowUserVerbose
@@ -80,16 +86,18 @@ share/html/Search/Results.tsv #content-type bug fix
share/html/Search/Elements/BuildFormatString
share/html/Search/Elements/PickCFs #customfield date patch
share/html/Ticket/Checklist.html
- share/html/Ticket/Display.html
+ share/html/Ticket/Display.html #timeworked custom fields
share/html/Ticket/Elements/AddCustomers
share/html/Ticket/Elements/CheckMandatoryFields
share/html/Ticket/Elements/EditCustomers
+share/html/Ticket/Elements/EditTransactionCustomFields #timeworked custom fields
share/html/Ticket/Elements/ShowCustomers
share/html/Ticket/Elements/ShowMembers_Checklist
share/html/Ticket/Elements/BulkLinks
share/html/Ticket/Elements/ShowSummary
share/html/Ticket/Elements/ShowTransactionAttachments
share/html/Ticket/Elements/Tabs #saved searches
+share/html/Ticket/Update.html #timeworked custom fields
share/html/Ticket/ModifyCustomers.html
html/NoAuth/css/3.5-default/main.css
html/NoAuth/css/3.5-default/misc.css
diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in
index c73a1e52f..2a50c915e 100644
--- a/rt/etc/RT_Config.pm.in
+++ b/rt/etc/RT_Config.pm.in
@@ -1529,6 +1529,16 @@ Use this to set the default units for time entry to hours instead of minutes.
Set($DefaultTimeUnitsToHours, 0);
+=item C<$SimpleSearchIncludeResolved>
+
+By default, the simple ticket search in the top bar excludes "resolved" tickets
+unless a status argument is specified. Set this to a true value to include
+them.
+
+=cut
+
+Set($SimpleSearchIncludeResolve, 0);
+
=back
=head1 L<Net::Server> (rt-server) Configuration
diff --git a/rt/lib/RT/Search/Googleish.pm b/rt/lib/RT/Search/Googleish.pm
index 4c14c4756..88634ff3b 100644
--- a/rt/lib/RT/Search/Googleish.pm
+++ b/rt/lib/RT/Search/Googleish.pm
@@ -175,13 +175,15 @@ sub QueryToSQL {
push @queue_clauses, "Queue = '$quoted_queue'";
}
+ if ( ! @status_clauses
+ and ! RT->Config->Get('SimpleSearchIncludeResolved') ) {
+ # implicitly exclude resolved status
+ @status_clauses = map "Status = '$_'", RT::Queue->ActiveStatusArray();
+ }
+
push @tql_clauses, join( " OR ", sort @id_clauses );
push @tql_clauses, join( " OR ", sort @owner_clauses );
- if ( ! @status_clauses ) {
- push @tql_clauses, join( " OR ", map "Status = '$_'", RT::Queue->ActiveStatusArray());
- } else {
- push @tql_clauses, join( " OR ", sort @status_clauses );
- }
+ push @tql_clauses, join( " OR ", sort @status_clauses );
push @tql_clauses, join( " OR ", sort @user_clauses );
push @tql_clauses, join( " OR ", sort @queue_clauses );
@tql_clauses = grep { $_ ? $_ = "( $_ )" : undef } @tql_clauses;