[Rt-commit] rtir branch, 2.5-trunk, updated. f99bf7ec4e871f70b4721eff79363f62fbbc32b4
Ruslan Zakirov
ruz at bestpractical.com
Wed Aug 26 19:50:53 EDT 2009
The branch, 2.5-trunk has been updated
via f99bf7ec4e871f70b4721eff79363f62fbbc32b4 (commit)
via fa25c08875e18a0d7bf09761c0f0914622b6de09 (commit)
via 8076196df6fe18385947e9f0bc579bb7f9cba0eb (commit)
via 121962bcf744f50eb28132c879e0fd313e6fd927 (commit)
via a57ead0cce5285d5c3c40e9e838706d0ba7997c6 (commit)
via 0f6e9d584b20827e3882b8d3b520aa71e84ae71c (commit)
from b655ae1fc2e1c03d3955f6019399ec600443f00b (commit)
Summary of changes:
META.yml | 2 +-
etc/RTIR_Config.pm | 14 ++--
html/Callbacks/RTIR/Elements/ListActions/ModifyRow | 4 -
.../RTIR/Elements/RT__Ticket/ColumnMap/Once | 19 -----
.../Ticket/Elements/ShowTransaction/ModifyDisplay | 21 ------
html/RTIR/Elements/PickRestriction | 71 +++-----------------
html/RTIR/Elements/SearchRTIRField | 43 ------------
html/RTIR/Elements/SelectCustomFieldOperator | 43 ------------
html/RTIR/Elements/SelectCustomFieldValue | 38 -----------
html/RTIR/Elements/ShowRTIRField | 1 -
html/RTIR/Incident/BulkAbandon.html | 2 +-
lib/RT/IR.pm | 2 +-
12 files changed, 20 insertions(+), 240 deletions(-)
delete mode 100644 html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay
delete mode 100644 html/RTIR/Elements/SearchRTIRField
delete mode 100644 html/RTIR/Elements/SelectCustomFieldOperator
delete mode 100644 html/RTIR/Elements/SelectCustomFieldValue
- Log -----------------------------------------------------------------
commit 0f6e9d584b20827e3882b8d3b520aa71e84ae71c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Aug 26 16:50:46 2009 +0400
default config still had _RTIR_State and unbalanced tag
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 2bbb55a..55254fb 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -134,7 +134,7 @@ Set($RTIRSearchResultFormats, {
ReportDefault =>
q{'<b><a HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__/TITLE:State',
+ '__CustomField.{State}__/TITLE:State',
__LastUpdatedRelative__,
__CreatedRelative__,
__NEWLINE__,
@@ -142,7 +142,7 @@ Set($RTIRSearchResultFormats, {
InvestigationDefault =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__/TITLE:State',
+ '__CustomField.{State}__/TITLE:State',
__LastUpdatedRelative__,
__CreatedRelative__,
__NEWLINE__,
@@ -151,7 +151,7 @@ Set($RTIRSearchResultFormats, {
BlockDefault =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__/TITLE:State',
+ '__CustomField.{State}__/TITLE:State',
__LastUpdatedRelative__,
__CreatedRelative__,
__NEWLINE__,
@@ -160,7 +160,7 @@ Set($RTIRSearchResultFormats, {
IncidentDefault =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__/TITLE:State',
+ '__CustomField.{State}__/TITLE:State',
__LastUpdatedRelative__,
__CreatedRelative__,
__Priority__,
@@ -210,19 +210,19 @@ Set($RTIRSearchResultFormats, {
ChildReport =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__</I>/TITLE:State',
+ '__CustomField.{State}__',
__DueRelative__},
ChildInvestigation =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__</I>/TITLE:State',
+ '__CustomField.{State}__',
__DueRelative__},
ChildBlock =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__</I>/TITLE:State',
+ '__CustomField.{State}__',
__DueRelative__},
} );
commit a57ead0cce5285d5c3c40e9e838706d0ba7997c6
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Aug 26 16:53:22 2009 +0400
delete some operations we don't need anymore since CFs rename
diff --git a/html/Callbacks/RTIR/Elements/ListActions/ModifyRow b/html/Callbacks/RTIR/Elements/ListActions/ModifyRow
index ad1b869..3ad45c3 100644
--- a/html/Callbacks/RTIR/Elements/ListActions/ModifyRow
+++ b/html/Callbacks/RTIR/Elements/ListActions/ModifyRow
@@ -17,10 +17,6 @@ return unless $m->request_comp->path =~ m{^/RTIR/};
if ( $$row =~ /^\s*(?:Ticket\s*#?\d+:\s*)?Status changed from/ ) {
return $$skip = 1;
}
-
-# remove _RTIR_ from RTIR custom fields
-$$row =~ s/^_RTIR_//;
-
</%INIT>
<%ARGS>
diff --git a/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once b/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
index 40ed67b..b1912af 100644
--- a/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
+++ b/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
@@ -1,25 +1,6 @@
<%INIT>
use RT::Crypt::GnuPG;
-# XXX: map RTIR hidden custom fields staticaly because user has no rights
-# to see this CFs we need to hack over ACLs
-my $rtir_cfs = RT::CustomFields->new( $RT::SystemUser );
-$rtir_cfs->Limit( FIELD => 'Name', OPERATOR => 'STARTSWITH', VALUE => '_RTIR_' );
-while ( my $cf = $rtir_cfs->Next ) {
- my $name = $cf->Name;
- my ($display_name) = $name =~ /^_RTIR_(.*)/i;
- next if exists $COLUMN_MAP->{ "CustomField.{$name}" };
-
- my %h = (
- title => $display_name,
- value => sub {
- return $COLUMN_MAP->{ "CustomField" }->{'value'}->(@_, $name)
- },
- );
- $COLUMN_MAP->{ "CF.{$name}" } =
- $COLUMN_MAP->{ "CustomField.{$name}" } = \%h;
-}
-
$COLUMN_MAP->{'Take'} = {
title => 'Take',
value => sub {
diff --git a/html/RTIR/Elements/ShowRTIRField b/html/RTIR/Elements/ShowRTIRField
index 766847b..31b79a9 100644
--- a/html/RTIR/Elements/ShowRTIRField
+++ b/html/RTIR/Elements/ShowRTIRField
@@ -35,7 +35,6 @@
</ul>
% }
<%INIT>
-$Name = "_RTIR_". $Name;
my $values = $Ticket->CustomFieldValues( $Name );
my $count = $values->Count;
</%INIT>
commit 121962bcf744f50eb28132c879e0fd313e6fd927
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Aug 26 16:54:49 2009 +0400
delete custom CF based restrictions in the QB
RTIR's fields are not special anymore and list is flexible
diff --git a/html/RTIR/Elements/PickRestriction b/html/RTIR/Elements/PickRestriction
index 824ec49..e91b0cf 100644
--- a/html/RTIR/Elements/PickRestriction
+++ b/html/RTIR/Elements/PickRestriction
@@ -66,69 +66,18 @@
&>
<input name="ValueOfAttachmentField" size="20" />
-% if ($QueueObj->Name eq 'Incidents') {
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'State' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'Constituency' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'Description' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'Function' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'Classification' &>
-
-% } elsif ($QueueObj->Name eq 'Incident Reports') {
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'State' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'SLA' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'HowReported' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'ReporterType' &>
-
-% } elsif ($QueueObj->Name eq 'Investigations') {
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'State' &>
-
-% } elsif ($QueueObj->Name eq 'Blocks' && !RT->Config->Get('RTIR_DisableBlocksQueue') ) {
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'State' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'IP',
- Label => 'IP Address' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'Netmask' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'Port' &>
-
-<li><& /RTIR/Elements/SearchRTIRField, QueueObj => $QueueObj,
- Name => 'WhereBlocked',
- Label => 'Where Blocked' &>
-
-% }
-
% while ( my $CustomField = $CustomFields->Next ) {
<li><% $CustomField->Name %>
- <& /Elements/SelectCustomFieldOperator, Name => "CustomFieldOp". $CustomField->id,
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=', FalseVal => '!=' &>
-
-<& /Elements/SelectCustomFieldValue, Name => "CustomField".$CustomField->id,
- CustomField => $CustomField,
- &>
+<& /Elements/SelectCustomFieldOperator,
+ Name => "CustomFieldOp". $CustomField->id,
+ True => loc("is"),
+ False => loc("isn't"),
+ TrueVal=> '=', FalseVal => '!=',
+&>
+<& /Elements/SelectCustomFieldValue,
+ Name => "CustomField".$CustomField->id,
+ CustomField => $CustomField,
+&>
% }
commit 8076196df6fe18385947e9f0bc579bb7f9cba0eb
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Aug 26 16:56:15 2009 +0400
delete _RTIR_ prefix we missed
diff --git a/html/RTIR/Incident/BulkAbandon.html b/html/RTIR/Incident/BulkAbandon.html
index 55bf967..71edf36 100644
--- a/html/RTIR/Incident/BulkAbandon.html
+++ b/html/RTIR/Incident/BulkAbandon.html
@@ -113,7 +113,7 @@ if ( $ARGS{'BulkAbandon'} ) {
# process replies
if( scalar @ReplyToAll ) {
# XXX: why do we limit to open?
- my $query = "CF.{_RTIR_State} = 'open' AND MemberOf = $id";
+ my $query = "CF.{State} = 'open' AND MemberOf = $id";
$query .= " AND (". join(' OR ', map "Queue = '$_'", @ReplyToAll) .")";
my $members = new RT::Tickets( $t->CurrentUser );
$members->FromSQL( $query );
commit fa25c08875e18a0d7bf09761c0f0914622b6de09
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Aug 26 16:56:44 2009 +0400
delete code we don't need anymore at all
diff --git a/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay b/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay
deleted file mode 100644
index 0410148..0000000
--- a/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay
+++ /dev/null
@@ -1,21 +0,0 @@
-<%INIT>
-# protect from a bug in 3.8.0
-return unless $text && ref($text) eq 'SCALAR';
-
-# remove the prefix from the beginning of the text
-# useful for removing _RTIR_ from RTIR custom fields
-# $text is passed by reference
-
-if ( $Transaction->Type eq 'CustomField' &&
- substr($$text, 0, length($prefix)) eq $prefix )
-{
- substr($$text, 0, length($prefix)) = '';
-}
-
-</%INIT>
-
-<%ARGS>
-$text => undef
-$prefix => '_RTIR_'
-$Transaction => undef
-</%ARGS>
diff --git a/html/RTIR/Elements/SearchRTIRField b/html/RTIR/Elements/SearchRTIRField
deleted file mode 100644
index 9bbd520..0000000
--- a/html/RTIR/Elements/SearchRTIRField
+++ /dev/null
@@ -1,43 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2002 Jesse Vincent <jesse at bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%#
-%# Unless otherwise specified, all modifications, corrections or
-%# extensions to this work which alter its source code become the
-%# property of Best Practical Solutions, LLC when submitted for
-%# inclusion in the work.
-%#
-%#
-%# END LICENSE BLOCK
-% if ($Label) {
-<% $Label %>
-% } else {
-<% $Name %>
-% }
-
-<& /RTIR/Elements/SelectCustomFieldOperator,
- QueueObj => $QueueObj,
- Name => $Name &>
-
-<& /RTIR/Elements/SelectCustomFieldValue,
- QueueObj => $QueueObj,
- Name => $Name &>
-
-<%ARGS>
-$Name => undef
-$Label => undef
-$QueueObj => undef
-</%ARGS>
diff --git a/html/RTIR/Elements/SelectCustomFieldOperator b/html/RTIR/Elements/SelectCustomFieldOperator
deleted file mode 100644
index 0cb7c66..0000000
--- a/html/RTIR/Elements/SelectCustomFieldOperator
+++ /dev/null
@@ -1,43 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2002 Jesse Vincent <jesse at bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%#
-%# Unless otherwise specified, all modifications, corrections or
-%# extensions to this work which alter its source code become the
-%# property of Best Practical Solutions, LLC when submitted for
-%# inclusion in the work.
-%#
-%#
-%# END LICENSE BLOCK
-% if (defined $cf) {
-<& /Elements/SelectCustomFieldOperator,
- CustomField => $cf,
- Name => $FieldName,
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=', FalseVal => '!=' &>
-% }
-
-<%INIT>
-my $cf = RT::CustomField->new($session{'CurrentUser'});
-$cf->LoadByNameAndQueue(Queue => $QueueObj->Id, Name => "_RTIR_".$Name);
-my $FieldName = "CustomFieldOp".$cf->id;
-
-</%INIT>
-<%ARGS>
-$QueueObj => undef
-$Name => undef
-</%ARGS>
diff --git a/html/RTIR/Elements/SelectCustomFieldValue b/html/RTIR/Elements/SelectCustomFieldValue
deleted file mode 100644
index 84b73e9..0000000
--- a/html/RTIR/Elements/SelectCustomFieldValue
+++ /dev/null
@@ -1,38 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2002 Jesse Vincent <jesse at bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%#
-%# Unless otherwise specified, all modifications, corrections or
-%# extensions to this work which alter its source code become the
-%# property of Best Practical Solutions, LLC when submitted for
-%# inclusion in the work.
-%#
-%#
-%# END LICENSE BLOCK
-<& /Elements/SelectCustomFieldValue,
- CustomField => $cf,
- Name => $FieldName,
-&>
-<%INIT>
-my $cf = RT::CustomField->new( $session{'CurrentUser'} );
-$cf->LoadByNameAndQueue(Queue => $QueueObj->Id, Name => "_RTIR_".$Name);
-my $FieldName = "CustomField".$cf->id;
-</%INIT>
-
-<%ARGS>
-$QueueObj => undef
-$Name => undef
-</%ARGS>
commit f99bf7ec4e871f70b4721eff79363f62fbbc32b4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 27 03:50:17 2009 +0400
bump version
diff --git a/META.yml b/META.yml
index 10acbe9..bdf5936 100644
--- a/META.yml
+++ b/META.yml
@@ -33,4 +33,4 @@ requires:
Regexp::Common: 0
Regexp::Common::net::CIDR: 0
perl: 5.8.3
-version: 2.5.2
+version: 2.5.3
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index c8b80ec..e858f26 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -46,7 +46,7 @@
#
package RT::IR;
-our $VERSION = '2.5.2';
+our $VERSION = '2.5.3';
use 5.008003;
use warnings;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list