option to include resolved tickets in search, RT#11658
authormark <mark>
Fri, 18 Feb 2011 01:24:56 +0000 (01:24 +0000)
committermark <mark>
Fri, 18 Feb 2011 01:24:56 +0000 (01:24 +0000)
rt/FREESIDE_MODIFIED
rt/etc/RT_Config.pm.in
rt/lib/RT/Search/Googleish.pm

index be645f2..6bef539 100644 (file)
@@ -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
index c73a1e5..2a50c91 100644 (file)
@@ -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
index 4c14c47..88634ff 100644 (file)
@@ -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;