[Rt-commit] rtir branch, 2.5-trunk, updated. fc0639658bcb49da946f647d09b57691d3e360f5
Ruslan Zakirov
ruz at bestpractical.com
Thu Aug 27 19:06:53 EDT 2009
The branch, 2.5-trunk has been updated
via fc0639658bcb49da946f647d09b57691d3e360f5 (commit)
via 33de8c76af13c61e976cbcf941d5a76bbdffeba5 (commit)
from f99bf7ec4e871f70b4721eff79363f62fbbc32b4 (commit)
Summary of changes:
MANIFEST | 4 ----
html/RTIR/index.html | 29 +++++++++++++++--------------
2 files changed, 15 insertions(+), 18 deletions(-)
- Log -----------------------------------------------------------------
commit 33de8c76af13c61e976cbcf941d5a76bbdffeba5
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 27 04:00:20 2009 +0400
update manifest
diff --git a/MANIFEST b/MANIFEST
index d0a07db..e4e155f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -50,7 +50,6 @@ html/Callbacks/RTIR/Ticket/Create.html/Default
html/Callbacks/RTIR/Ticket/Display.html/Initial
html/Callbacks/RTIR/Ticket/Elements/EditCustomFields/MassageCustomFields
html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction
-html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay
html/Callbacks/RTIR/User/Elements/Tabs/Default
html/RTIR/Advanced.html
html/RTIR/Block/Elements/EditState
@@ -81,9 +80,6 @@ html/RTIR/Elements/PickRestriction
html/RTIR/Elements/QueueSummary
html/RTIR/Elements/QueueTabs
html/RTIR/Elements/Refresh
-html/RTIR/Elements/SearchRTIRField
-html/RTIR/Elements/SelectCustomFieldOperator
-html/RTIR/Elements/SelectCustomFieldValue
html/RTIR/Elements/ShowChildren
html/RTIR/Elements/ShowDates
html/RTIR/Elements/ShowIncidents
commit fc0639658bcb49da946f647d09b57691d3e360f5
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Aug 28 03:05:43 2009 +0400
Search by IP if query is IP only
diff --git a/html/RTIR/index.html b/html/RTIR/index.html
index c64c710..3ca6bb5 100644
--- a/html/RTIR/index.html
+++ b/html/RTIR/index.html
@@ -38,6 +38,8 @@ unless ( exists $session{'my_rtir_portlets'} ) {
}
my $portlets = $session{'my_rtir_portlets'};
+use Regexp::Common qw(RE_net_IPv4);
+
if ( $ARGS{'q'} ) {
my $query = $ARGS{'q'};
@@ -59,23 +61,22 @@ if ( $ARGS{'q'} ) {
Queue = 'Blocks'
) AND Requestor LIKE '$query'"
);
- my $querystring;
+ $query = '';
while ( my $child = $children->Next ) {
- $querystring .= " OR " if $querystring;
- $querystring .= "HasMember = " . $child->Id;
+ $query .= " OR " if $query;
+ $query .= "HasMember = " . $child->Id;
}
- return $m->comp(
- '/RTIR/Search/Results.html',
- Queue => 'Incidents',
- Query => $querystring,
- );
+ $query ||= 'id = 0';
+ }
+ elsif ( $query =~ /^\s*($RE{net}{IPv4})\s*$/o && RT::IR->CustomFields('IP') ) {
+ $query = "Queue = 'Incidents' AND 'CustomField.{IP}' = '$1'";
+ }
+ else {
+ # Any search on queue name or subject will be for new/open tickets only.
+ $query = join ' AND ',
+ "Subject LIKE '$query'",
+ $m->comp( '/RTIR/Elements/NewQuery', Queue => 'Incidents' );
}
-
-
- # Any search on queue name or subject will be for new/open tickets only.
- $query = join ' AND ',
- "Subject LIKE '$query'",
- $m->comp( '/RTIR/Elements/NewQuery', Queue => 'Incidents' );
return $m->comp(
'/RTIR/Search/Results.html',
Queue => 'Incidents',
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list