[Rt-commit] r13988 - in rt/branches/3.999-DANGEROUS: . etc lib/RT lib/RT/Action lib/RT/Graph lib/RT/Interface lib/RT/Model lib/RT/ScripAction sbin share/html/Admin/Elements share/html/Dashboards share/html/Elements/RT__Scrip share/html/Search/Elements share/html/Ticket/Graphs share/html/Ticket/Graphs/Elements share/html/Widgets share/html/Widgets/Form
jesse at bestpractical.com
jesse at bestpractical.com
Fri Jul 11 10:33:14 EDT 2008
Author: jesse
Date: Fri Jul 11 10:33:11 2008
New Revision: 13988
Added:
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm
- copied, changed from r13984, /rt/branches/3.999-DANGEROUS/lib/RT/Action.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/ExtractSubjectTag.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm
- copied, changed from r13984, /rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroup.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroupAsComment.pm
- copied, changed from r13984, /rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroupAsComment.pm
Removed:
rt/branches/3.999-DANGEROUS/lib/RT/Action.pm
rt/branches/3.999-DANGEROUS/lib/RT/Action/ExtractSubjectTag.pm
rt/branches/3.999-DANGEROUS/lib/RT/Action/LinearEscalate.pm
rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroup.pm
rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroupAsComment.pm
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/etc/initialdata
rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm
rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm
rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
rt/branches/3.999-DANGEROUS/lib/RT/SavedSearch.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm
rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm
rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in
rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/AddCustomFieldValue
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditCustomFieldValues
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrip
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html
rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Scrip/ColumnMap
rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html
rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments
rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Boolean
rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Integer
rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Select
rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String
rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch
rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
Log:
r39661 at 68-246-144-190: jesse | 2008-07-11 09:56:43 -0400
* checkpoint for a move
r39662 at 68-246-144-190: jesse | 2008-07-11 10:29:31 -0400
* a whole bunch of quick cleanup
r39663 at 68-246-144-190: jesse | 2008-07-11 10:32:00 -0400
revert mis-move
Modified: rt/branches/3.999-DANGEROUS/etc/initialdata
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/initialdata (original)
+++ rt/branches/3.999-DANGEROUS/etc/initialdata Fri Jul 11 10:33:11 2008
@@ -94,10 +94,10 @@
exec_module => 'CreateTickets', },
{ name => 'Open Tickets', # loc
description => 'Open tickets on correspondence', # loc
- { name => 'Extract Subject Tag', # loc
- Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
- ExecModule => 'ExtractSubjectTag' },
exec_module => 'AutoOpen' },
+ { name => 'Extract Subject Tag', # loc
+ description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
+ exec_module => 'ExtractSubjectTag' },
);
@scrip_conditions = (
@@ -422,7 +422,7 @@
{ queue => '0',
name => 'email Digest', # loc
- Description => 'email template for periodic notification digests', # loc
+ description => 'email template for periodic notification digests', # loc
Content => q[Subject: RT email Digest
{ $Argument }
@@ -432,7 +432,7 @@
{
queue => 0,
name => "Error: Missing dashboard", # loc
- Description =>
+ description =>
"Inform user that a dashboard he subscribed to is missing", # loc
Content => q{Subject: [{RT->config->get('rtname')}] Missing dashboard!
@@ -498,7 +498,7 @@
scrip_condition => 'On Resolve',
scrip_action => 'Notify requestors',
template => 'resolved' },
- { Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
+ { description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
ScripCondition => 'On Transaction',
ScripAction => 'Extract Subject Tag',
Template => 'Blank' },
@@ -699,7 +699,7 @@
},
},
{ name => 'Search - Bookmarked Tickets',
- Description => 'Bookmarked Tickets', #loc
+ description => 'Bookmarked Tickets', #loc
Content =>
{ format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
. q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm Fri Jul 11 10:33:11 2008
@@ -107,7 +107,7 @@
return $object->AddAttribute(
'Name' => 'Dashboard',
- 'Description' => $args->{'Name'},
+ 'description' => $args->{'Name'},
'Content' => { Searches => $args->{'Searches'} },
);
}
@@ -125,7 +125,7 @@
if ( $status && $args->{'Name'} ) {
( $status, $msg ) =
- $self->{'Attribute'}->SetDescription( $args->{'Name'} )
+ $self->{'Attribute'}->set_description( $args->{'Name'} )
unless $self->Name eq $args->{'Name'};
}
@@ -170,7 +170,7 @@
sub SearchIds {
my $self = shift;
- return unless ref( $self->{'Attribute'} ) eq 'RT::Attribute';
+ return unless ref( $self->{'Attribute'} ) eq 'RT::Model::Attribute';
return @{ $self->{'Attribute'}->SubValue('Searches') || [] };
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm Fri Jul 11 10:33:11 2008
@@ -289,7 +289,7 @@
MaxDepth => 0,
CurrentDepth => 1,
- ShowLinkDescriptions => 0,
+ show_link_descriptions => 0,
@_
);
unless ( $args{'Graph'} ) {
@@ -319,8 +319,8 @@
$args{'SeenEdge'} ||= {};
- my $show_link_descriptions = $args{'ShowLinkDescriptions'}
- && RT::Link->can('Description');
+ my $show_link_descriptions = $args{'show_link_descriptions'}
+ && RT::Link->can('description');
foreach my $type ( $args{'LeadingLink'}, @{ $args{'ShowLinks'} } ) {
my $links = $args{'Ticket'}->$type();
@@ -348,7 +348,7 @@
);
my $desc;
- $desc = $link->Description if $show_link_descriptions;
+ $desc = $link->description if $show_link_descriptions;
$args{'Graph'}->add_edge(
# we revers order of member links to get better layout
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Installer.pm Fri Jul 11 10:33:11 2008
@@ -55,7 +55,7 @@
DatabaseType => {
Widget => '/Widgets/Form/Select',
WidgetArguments => {
- Description => 'Database type', # loc
+ description => 'Database type', # loc
Values => [
grep {
my $m = 'DBD::' . $_;
@@ -73,7 +73,7 @@
DatabaseHost => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Database host', #loc
+ description => 'Database host', #loc
Default => 1,
DefaultLabel => "Keep 'localhost' if you're not sure", #loc
Hints =>
@@ -84,7 +84,7 @@
DatabasePort => {
Widget => '/Widgets/Form/Integer',
WidgetArguments => {
- Description => 'Database port', #loc
+ description => 'Database port', #loc
Default => 1,
DefaultLabel =>
'Leave empty to use the default value for your database', #loc
@@ -93,7 +93,7 @@
DatabaseName => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Database name', #loc
+ description => 'Database name', #loc
},
},
DatabaseAdmin => {
@@ -103,14 +103,14 @@
Hints =>
"Leave this alone to use the default dba username for your database type"
, #loc
- Description => 'DBA username', # loc
+ description => 'DBA username', # loc
DefaultLabel => '',
},
},
DatabaseAdminPassword => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'DBA password', #loc
+ description => 'DBA password', #loc
DefaultLabel => "The DBA's database password", #loc
Type => 'password',
Hints =>
@@ -120,7 +120,7 @@
DatabaseUser => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Database username for RT', #loc
+ description => 'Database username for RT', #loc
Hints =>
'RT will connect to the database using this user. It will be created for you.'
, #loc
@@ -129,7 +129,7 @@
DatabasePassword => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Database password for RT', #loc
+ description => 'Database password for RT', #loc
Type => 'password',
Hints => 'The password RT should use to connect to the database.',
},
@@ -137,13 +137,13 @@
DatabaseRequireSSL => {
Widget => '/Widgets/Form/Boolean',
WidgetArguments => {
- Description => 'Use SSL?', # loc
+ description => 'Use SSL?', # loc
},
},
rtname => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Site name', #loc
+ description => 'Site name', #loc
Hints =>
'RT will use this string to uniquely identify your installation and looks for it in the subject of emails to decide what ticket a message applies to. We recommend that you set this to your internet domain. (ex: example.com)' #loc
},
@@ -151,13 +151,13 @@
MinimumPasswordLength => {
Widget => '/Widgets/Form/Integer',
WidgetArguments => {
- Description => 'Minimum password length', #loc
+ description => 'Minimum password length', #loc
},
},
Password => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Administrative password', #loc
+ description => 'Administrative password', #loc
Hints =>
'RT will create a user called "root" and set this as their password'
, #loc
@@ -167,7 +167,7 @@
OwnerEmail => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'RT Administrator Email', #loc
+ description => 'RT Administrator Email', #loc
Hints =>
"When RT can't handle an email message, where should it be forwarded?"
, #loc
@@ -176,7 +176,7 @@
CommentAddress => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Comment address', #loc
+ description => 'Comment address', #loc
Hints =>
'the default addresses that will be listed in From: and Reply-To: headers of comment mail.' #loc
},
@@ -184,7 +184,7 @@
CorrespondAddress => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Correspond address', #loc
+ description => 'Correspond address', #loc
Hints =>
'the default addresses that will be listed in From: and Reply-To: headers of correspondence mail.' #loc
},
@@ -193,13 +193,13 @@
Widget => '/Widgets/Form/String',
WidgetArguments => {
Hints => 'Where to find your sendmail binary.', #loc
- Description => 'Path to sendmail', #loc
+ description => 'Path to sendmail', #loc
},
},
WebDomain => {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Domain name', #loc
+ description => 'Domain name', #loc
Hints =>
"Don't include http://, just something like 'localhost', 'rt.example.com'"
, #loc
@@ -208,7 +208,7 @@
WebPort => {
Widget => '/Widgets/Form/Integer',
WidgetArguments => {
- Description => 'Web port', #loc
+ description => 'Web port', #loc
Hints =>
'which port your web server will listen to, e.g. 8080', #loc
},
@@ -222,7 +222,7 @@
$Meta{Timezone} = {
Widget => '/Widgets/Form/Select',
WidgetArguments => {
- Description => 'Timezone', #loc
+ description => 'Timezone', #loc
Callback => sub {
my $ret;
$ret->{Values} = [ '', DateTime::TimeZone->all_names ];
@@ -247,7 +247,7 @@
$Meta{Timezone} = {
Widget => '/Widgets/Form/String',
WidgetArguments => {
- Description => 'Timezone', #loc
+ description => 'Timezone', #loc
},
};
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm Fri Jul 11 10:33:11 2008
@@ -612,7 +612,7 @@
$mail->attach(
Type => 'message/rfc822',
Disposition => 'attachment',
- Description => 'forwarded message',
+ description => 'forwarded message',
Data => $entity->as_string,
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm Fri Jul 11 10:33:11 2008
@@ -868,7 +868,7 @@
if ( $args_ref->{"$prefix-AddValue-name"} ) {
my ( $addval, $addmsg ) = $object->add_value(
name => $args_ref->{"$prefix-AddValue-name"},
- description => $args_ref->{"$prefix-AddValue-Description"},
+ description => $args_ref->{"$prefix-AddValue-description"},
sort_order => $args_ref->{"$prefix-AddValue-sort_order"},
);
push( @results, $addmsg );
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm Fri Jul 11 10:33:11 2008
@@ -103,7 +103,6 @@
],
Image => [
'Upload multiple images', # loc
-RT::Model::CustomField->_for_objectType( 'RT::Model::Queue' => "Queues", ); #loc
'Upload one image', # loc
'Upload up to %1 images', # loc
],
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm Fri Jul 11 10:33:11 2008
@@ -237,9 +237,9 @@
$principal = $principal->id if ref $principal;
return $self->load_by_cols(
- Domain => 'ACLEquivalence',
+ domain => 'ACLEquivalence',
type => 'UserEquiv',
- Instance => $principal,
+ instance => $principal,
);
}
@@ -286,7 +286,7 @@
my $identifier = shift;
return $self->load_by_cols(
- Domain => 'SystemInternal',
+ domain => 'SystemInternal',
type => $identifier,
);
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm Fri Jul 11 10:33:11 2008
@@ -172,6 +172,10 @@
via => '0'
);
+ #and popuplate the CachedGroupMembers of all the groups that group is part of .
+
+ my $cgm = RT::Model::CachedGroupMemberCollection->new;
+
#When adding a member to a group, we need to go back
$cgm->limit(
subclause => 'filter', # dont't mess up with prev condition
@@ -181,10 +185,6 @@
quote_value => 0,
entry_aggregator => 'AND',
);
- #and popuplate the CachedGroupMembers of all the groups that group is part of .
-
- my $cgm = RT::Model::CachedGroupMemberCollection->new;
-
# find things which have the current group as a member.
# $group is an RT::Model::Principal for the group.
$cgm->limit_to_groups_with_member( $args{'group'}->id );
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm Fri Jul 11 10:33:11 2008
@@ -558,7 +558,7 @@
my ( $status, $msg ) = RT->System->set_attribute(
name => 'BrandedSubjectTag',
- Description => 'Queue id => subject tag map',
+ description => 'Queue id => subject tag map',
Content => $map,
);
return ( $status, $msg ) unless $status;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm Fri Jul 11 10:33:11 2008
@@ -1045,7 +1045,6 @@
# {{{ sub _add_link
-=head2 _add_link
# {{{ sub formatType
@@ -1091,6 +1090,8 @@
# }}}
+=head2 _add_link
+
Takes a paramhash of type and one of base or target. Adds that link to this object.
Returns C<link id>, C<message> and C<exist> flag.
@@ -1163,8 +1164,6 @@
FallBack => $args{target}
);
my $typetext = $self->formatType( type => $args{type} );
- my $TransString = "$basetext $typetext $targettext.";
- return ( $linkid, $TransString );
my $TransString = "Record $args{'base'} $args{'type'} record $args{'target'}.";
Modified: rt/branches/3.999-DANGEROUS/lib/RT/SavedSearch.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SavedSearch.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SavedSearch.pm Fri Jul 11 10:33:11 2008
@@ -97,7 +97,7 @@
return $object->AddAttribute(
'Name' => 'SavedSearch',
- 'Description' => $args->{'Name'},
+ 'description' => $args->{'Name'},
'Content' => $params,
);
}
@@ -111,7 +111,7 @@
my ($status, $msg) = $self->{'Attribute'}->SetSubValues(%$params);
if ($status && $args->{'Name'}) {
- ($status, $msg) = $self->{'Attribute'}->SetDescription($args->{'Name'});
+ ($status, $msg) = $self->{'Attribute'}->set_description($args->{'Name'});
}
return ($status, $msg);
Copied: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm (from r13984, /rt/branches/3.999-DANGEROUS/lib/RT/Action.pm)
==============================================================================
--- /rt/branches/3.999-DANGEROUS/lib/RT/Action.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction.pm Fri Jul 11 10:33:11 2008
@@ -48,11 +48,11 @@
=head1 NAME
- RT::Action - a generic baseclass for RT Actions
+ RT::ScripAction - a generic baseclass for RT Actions
=head1 SYNOPSIS
- use RT::Action;
+ use RT::ScripAction;
=head1 DESCRIPTION
@@ -61,7 +61,7 @@
=cut
-package RT::Action;
+package RT::ScripAction;
use strict;
use Scalar::Util;
@@ -229,9 +229,9 @@
# }}}
-eval "require RT::Action_Vendor";
+eval "require RT::ScripAction_Vendor";
die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Action_Vendor.pm} );
-eval "require RT::Action_Local";
+eval "require RT::ScripAction_Local";
die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Action_Local.pm} );
1;
Added: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/ExtractSubjectTag.pm
==============================================================================
--- (empty file)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/ExtractSubjectTag.pm Fri Jul 11 10:33:11 2008
@@ -0,0 +1,88 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
+# <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
+package RT::ScripAction::ExtractSubjectTag;
+use base 'RT::ScripAction';
+use strict;
+
+sub Describe {
+ my $self = shift;
+ return ( ref $self );
+}
+
+sub Prepare {
+ return (1);
+}
+
+sub Commit {
+ my $self = shift;
+ my $Transaction = $self->TransactionObj;
+ my $FirstAttachment = $Transaction->Attachments->First;
+ return 1 unless ($FirstAttachment);
+
+ my $Ticket = $self->TicketObj;
+
+ my $TicketSubject = $self->TicketObj->Subject;
+ my $origTicketSubject = $TicketSubject;
+ my $TransactionSubject = $FirstAttachment->Subject;
+
+ my $match = RT->Config->Get('ExtractSubjectTagMatch');
+ my $nomatch = RT->Config->Get('ExtractSubjectTagNoMatch');
+ while ( $TransactionSubject =~ /($match)/g ) {
+ my $tag = $1;
+ next if $tag =~ /$nomatch/;
+ $TicketSubject .= " $tag" unless ( $TicketSubject =~ /\Q$tag\E/ );
+ }
+
+ $self->TicketObj->SetSubject($TicketSubject)
+ if ( $TicketSubject ne $origTicketSubject );
+
+ return (1);
+}
+
+1;
Added: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm
==============================================================================
--- (empty file)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm Fri Jul 11 10:33:11 2008
@@ -0,0 +1,289 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
+# <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
+=head1 NAME
+
+RT::ScripAction::LinearEscalate - will move a ticket's priority toward its final priority.
+
+=head1 This vs. RT::ScripAction::EscalatePriority
+
+This action doesn't change priority if due date is not set.
+
+This action honor the Starts date.
+
+This action can apply changes silently.
+
+This action can replace EscalatePriority completly. If you want to tickets
+that have been created without Due date then you can add scrip that sets
+default due date. For example a week then priorities of your tickets will
+escalate linearly during the week from intial value towards final.
+
+=head1 This vs. LinearEscalate from the CPAN
+
+This action is an integration of the module from the CPAN into RT's core
+that's happened in RT 3.8. If you're upgrading from 3.6 and have been using
+module from the CPAN with old version of RT then you should uninstall it
+and use this one.
+
+However, this action doesn't support control over config. Read </CONFIGURATION>
+to find out ways to deal with it.
+
+=head1 DESCRIPTION
+
+LinearEscalate is a ScripAction that will move a ticket's priority
+from its initial priority to its final priority linearly as
+the ticket approaches its due date.
+
+It's intended to be called by an RT escalation tool. One such tool is called
+rt-crontool and is located in $RTHOME/bin (see C<rt-crontool -h> for more details).
+
+=head1 USAGE
+
+Once the ScripAction is installed, the following script in "cron"
+will get tickets to where they need to be:
+
+ rt-crontool --search RT::Search::FromSQL --search-arg \
+ "(Status='new' OR Status='open' OR Status = 'stalled')" \
+ --action RT::ScripAction::LinearEscalate
+
+The Starts date is associated with intial ticket's priority or
+the Created field if the former is not set. End of interval is
+the Due date. Tickets without due date B<are not updated>.
+
+=head1 CONFIGURATION
+
+Initial and Final priorities are controlled by queue's options
+and can be defined using the web UI via Configuration tab. This
+action should handle correctly situations when initial priority
+is greater than final.
+
+LinearEscalate's behavior can be controlled by two options:
+
+=over 4
+
+=item RecordTransaction - defaults to false and if option is true then
+causes the tool to create a transaction on the ticket when it is escalated.
+
+=item UpdateLastUpdated - which defaults to true and updates the LastUpdated
+field when the ticket is escalated, otherwise don't touch anything.
+
+=back
+
+You cannot set "UpdateLastUpdated" to false unless "RecordTransaction"
+is also false. Well, you can, but we'll just ignore you.
+
+You can set this options using either in F<RT_SiteConfig.pm>, as action
+argument in call to the rt-crontool or in DB if you want to use the action
+in scrips.
+
+From a shell you can use the following command:
+
+ rt-crontool --search RT::Search::FromSQL --search-arg \
+ "(Status='new' OR Status='open' OR Status = 'stalled')" \
+ --action RT::ScripAction::LinearEscalate \
+ --action-arg "RecordTransaction: 1"
+
+This ScripAction uses RT's internal _Set or __Set calls to set ticket
+priority without running scrips or recording a transaction on each
+update, if it's been said to.
+
+=cut
+
+package RT::ScripAction::LinearEscalate;
+
+use strict;
+use warnings;
+use base qw(RT::ScripAction);
+
+our $VERSION = '0.06';
+
+#Do what we need to do and send it out.
+
+#What does this type of Action does
+
+sub Describe {
+ my $self = shift;
+ my $class = ref($self) || $self;
+ return "$class will move a ticket's priority toward its final priority.";
+}
+
+sub Prepare {
+ my $self = shift;
+
+ my $ticket = $self->TicketObj;
+
+ my $due = $ticket->DueObj->Unix;
+ unless ( $due > 0 ) {
+ $RT::Logger->debug('Due is not set. Not escalating.');
+ return 1;
+ }
+
+ my $priority_range = $ticket->FinalPriority - $ticket->InitialPriority;
+ unless ($priority_range) {
+ $RT::Logger->debug(
+ 'Final and Initial priorities are equal. Not escalating.');
+ return 1;
+ }
+
+ if ( $ticket->Priority >= $ticket->FinalPriority && $priority_range > 0 ) {
+ $RT::Logger->debug(
+ 'Current priority is greater than final. Not escalating.');
+ return 1;
+ }
+ elsif ( $ticket->Priority <= $ticket->FinalPriority && $priority_range < 0 )
+ {
+ $RT::Logger->debug(
+ 'Current priority is lower than final. Not escalating.');
+ return 1;
+ }
+
+ # TODO: compute the number of business days until the ticket is due
+
+ # now we know we have a due date. for every day that passes,
+ # increment priority according to the formula
+
+ my $starts = $ticket->StartsObj->Unix;
+ $starts = $ticket->CreatedObj->Unix unless $starts > 0;
+ my $now = time;
+
+ # do nothing if we didn't reach starts or created date
+ if ( $starts > $now ) {
+ $RT::Logger->debug('Starts(Created) is in future. Not escalating.');
+ return 1;
+ }
+
+ $due = $starts + 1 if $due <= $starts; # +1 to avoid div by zero
+
+ my $percent_complete = ( $now - $starts ) / ( $due - $starts );
+
+ my $new_priority =
+ int( $percent_complete * $priority_range ) + $ticket->InitialPriority;
+ $new_priority = $ticket->FinalPriority
+ if $new_priority > $ticket->FinalPriority;
+ $self->{'new_priority'} = $new_priority;
+
+ return 1;
+}
+
+sub Commit {
+ my $self = shift;
+
+ my $new_value = $self->{'new_priority'};
+ return 1 unless defined $new_value;
+
+ my $ticket = $self->TicketObj;
+
+ # if the priority hasn't changed do nothing
+ return 1 if $ticket->Priority == $new_value;
+
+ # override defaults from argument
+ my ( $record, $update ) = ( 0, 1 );
+ {
+ my $arg = $self->Argument || '';
+ if ( $arg =~ /RecordTransaction:\s*(\d+)/i ) {
+ $record = $1;
+ $RT::Logger->debug("Overrode RecordTransaction: $record");
+ }
+ if ( $arg =~ /UpdateLastUpdated:\s*(\d+)/i ) {
+ $update = $1;
+ $RT::Logger->debug("Overrode UpdateLastUpdated: $update");
+ }
+ $update = 1 if $record;
+ }
+
+ $RT::Logger->debug( 'Linearly escalating priority of ticket #'
+ . $ticket->Id
+ . ' from '
+ . $ticket->Priority . ' to '
+ . $new_value . ' and'
+ . ( $record ? '' : ' do not' )
+ . ' record a transaction' . ' and'
+ . ( $update ? '' : ' do not' )
+ . ' touch last updated field' );
+
+ my ( $val, $msg );
+ unless ($record) {
+ unless ($update) {
+ ( $val, $msg ) = $ticket->__Set(
+ Field => 'Priority',
+ Value => $new_value,
+ );
+ }
+ else {
+ ( $val, $msg ) = $ticket->_Set(
+ Field => 'Priority',
+ Value => $new_value,
+ RecordTransaction => 0,
+ );
+ }
+ }
+ else {
+ ( $val, $msg ) = $ticket->SetPriority($new_value);
+ }
+
+ unless ($val) {
+ $RT::Logger->error("Couldn't set new priority value: $msg");
+ return ( 0, $msg );
+ }
+ return 1;
+}
+
+eval "require RT::ScripAction::LinearEscalate_Vendor";
+die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Action/LinearEscalate_Vendor.pm} );
+eval "require RT::ScripAction::LinearEscalate_Local";
+die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Action/LinearEscalate_Local.pm} );
+
+1;
+
+=head1 AUTHORS
+
+Kevin Riggle E<lt>kevinr at bestpractical.comE<gt>
+
+Ruslan Zakirov E<lt>ruz at bestpractical.comE<gt>
+
+=cut
Copied: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm (from r13984, /rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroup.pm)
==============================================================================
--- /rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroup.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm Fri Jul 11 10:33:11 2008
@@ -48,7 +48,7 @@
=head1 NAME
-RT::Action::NotifyGroup - RT Action that sends notifications to groups and/or users
+RT::ScripAction::NotifyGroup - RT Action that sends notifications to groups and/or users
=head1 DESCRIPTION
@@ -59,11 +59,11 @@
=cut
-package RT::Action::NotifyGroup;
+package RT::ScripAction::NotifyGroup;
use strict;
use warnings;
-use base qw(RT::Action::Notify);
+use base qw(RT::ScripAction::Notify);
require RT::User;
require RT::Group;
@@ -171,7 +171,7 @@
else {
next;
}
- $obj->Load( $r->{'Instance'} );
+ $obj->Load( $r->{'instance'} );
my $id = $obj->id;
next unless ($id);
@@ -192,7 +192,7 @@
Ruslan U. Zakirov E<lt>ruz at bestpractical.comE<gt>
-L<RT::Action::NotifyGroupAsComment>, F<rt-email-group-admin>
+L<RT::ScripAction::NotifyGroupAsComment>, F<rt-email-group-admin>
=cut
Copied: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroupAsComment.pm (from r13984, /rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroupAsComment.pm)
==============================================================================
--- /rt/branches/3.999-DANGEROUS/lib/RT/Action/NotifyGroupAsComment.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroupAsComment.pm Fri Jul 11 10:33:11 2008
@@ -48,23 +48,23 @@
=head1 NAME
-RT::Action::NotifyGroupAsComment - RT Action that sends notifications to groups and/or users as comment
+RT::ScripAction::NotifyGroupAsComment - RT Action that sends notifications to groups and/or users as comment
=head1 DESCRIPTION
-This is subclass of L<RT::Action::NotifyGroup> that send comments instead of replies.
-See C<rt-email-group-admin> and L<RT::Action::NotifyGroup> docs for more info.
+This is subclass of L<RT::ScripAction::NotifyGroup> that send comments instead of replies.
+See C<rt-email-group-admin> and L<RT::ScripAction::NotifyGroup> docs for more info.
=cut
-package RT::Action::NotifyGroupAsComment;
+package RT::ScripAction::NotifyGroupAsComment;
use strict;
use warnings;
-use RT::Action::NotifyGroup;
+use RT::ScripAction::NotifyGroup;
-use base qw(RT::Action::NotifyGroup);
+use base qw(RT::ScripAction::NotifyGroup);
sub SetReturnAddress {
my $self = shift;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SendEmail.pm Fri Jul 11 10:33:11 2008
@@ -458,7 +458,7 @@
my $ticket_mime = MIME::Entity->build(
Type => 'multipart/mixed',
Top => 0,
- Description => "ticket #$tid",
+ description => "ticket #$tid",
);
while ( my $attachment = $attachs->next ) {
$self->add_attachment( $attachment, $ticket_mime );
Modified: rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SharedSetting.pm Fri Jul 11 10:33:11 2008
@@ -64,7 +64,7 @@
package RT::SharedSetting;
use strict;
use warnings;
-use RT::Attribute;
+use RT::Model::Attribute;
use base qw/RT::Base/;
=head1 METHODS
@@ -137,7 +137,7 @@
=head2 LoadById
-First loads up the L<RT::Attribute> for this shared setting by ID, then calls
+First loads up the L<RT::Model::Attribute> for this shared setting by ID, then calls
L</Load> with the correct parameters. Returns a tuple of status and message,
where status is true on success.
@@ -147,7 +147,7 @@
my $self = shift;
my $id = shift;
- my $attr = RT::Attribute->new( $self->CurrentUser );
+ my $attr = RT::Model::Attribute->new( $self->CurrentUser );
my ( $ok, $msg ) = $attr->LoadById($id);
if ( !$ok ) {
@@ -308,8 +308,8 @@
sub Name {
my $self = shift;
- return unless ref( $self->{'Attribute'} ) eq 'RT::Attribute';
- return $self->{'Attribute'}->Description();
+ return unless ref( $self->{'Attribute'} ) eq 'RT::Model::Attribute';
+ return $self->{'Attribute'}->description();
}
=head2 Id
@@ -344,7 +344,7 @@
sub GetParameter {
my $self = shift;
my $param = shift;
- return unless ref( $self->{'Attribute'} ) eq 'RT::Attribute';
+ return unless ref( $self->{'Attribute'} ) eq 'RT::Model::Attribute';
return $self->{'Attribute'}->SubValue($param);
}
Modified: rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in
==============================================================================
--- rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in (original)
+++ rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in Fri Jul 11 10:33:11 2008
@@ -209,7 +209,7 @@
$deferred->{$freq}->{$user}->{'_sent'} = 1;
$txn->SetAttribute(
Name => 'DeferredRecipients',
- Description => 'Deferred recipients for this message',
+ description => 'Deferred recipients for this message',
Content => $deferred,
);
}
Modified: rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in
==============================================================================
--- rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in (original)
+++ rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in Fri Jul 11 10:33:11 2008
@@ -284,7 +284,7 @@
my $action = RT::ScripAction->new( $RT::SystemUser );
$action->Create(
Name => $name,
- Description => "Created with rt-email-group-admin script",
+ description => "Created with rt-email-group-admin script",
ExecModule => $as_comment? 'NotifyGroupAsComment': 'NotifyGroup',
Argument => '',
);
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/AddCustomFieldValue
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/AddCustomFieldValue (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/AddCustomFieldValue Fri Jul 11 10:33:11 2008
@@ -62,7 +62,7 @@
<tr>
<td><input type="text" size="3" name="<% $paramtag %>-sort_order" /></td>
<td><input type="text" size="30" name="<% $paramtag %>-name" /></td>
-<td><input type="text" size="50" name="<% $paramtag %>-Description" /></td>
+<td><input type="text" size="50" name="<% $paramtag %>-description" /></td>
% if ( $CustomField->type ne 'Combobox' ) {
<td><input type="text" size="10" name="<% $paramtag %>-category" /></td>
% }
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditCustomFieldValues
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditCustomFieldValues (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditCustomFieldValues Fri Jul 11 10:33:11 2008
@@ -68,7 +68,7 @@
<td><input type="checkbox" class="checkbox" name="Delete-<% $paramtag %>" /></td>
<td><input type="text" size="3" name="<% $paramtag %>-sort_order" value="<% $value->sort_order %>" /></td>
<td><input type="text" size="30" name="<% $paramtag %>-name" value="<% $value->name %>" /></td>
-<td><input type="text" size="50" name="<% $paramtag %>-Description" value="<% $value->description %>" /></td>
+<td><input type="text" size="50" name="<% $paramtag %>-description" value="<% $value->description %>" /></td>
% if ( $CustomField->type ne 'Combobox' ) {
<td><input type="text" size="10" name="<% $paramtag %>-category" value="<%
$value->category || '' %>" /></td>
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrip
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrip (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrip Fri Jul 11 10:33:11 2008
@@ -55,7 +55,7 @@
<table>
<tr><td align="right"><&|/l&>description</&>:</td><td>
-<input name="Scrip-<% $id %>-Description" value="<% $ARGS{"Scrip-$id-Description"} || $scrip->description || ''%>" />
+<input name="Scrip-<% $id %>-description" value="<% $ARGS{"Scrip-$id-description"} || $scrip->description || ''%>" />
</td></tr>
<tr><td align="right"><&|/l&>Condition</&>:</td><td>
@@ -172,7 +172,7 @@
scrip_action => $ARGS{"Scrip-new-scrip_action"},
scrip_condition => $ARGS{"Scrip-new-scrip_condition"},
template => $ARGS{"Scrip-new-Template"},
- description => $ARGS{"Scrip-new-Description"},
+ description => $ARGS{"Scrip-new-description"},
custom_prepare_code => $ARGS{"Scrip-new-custom_prepare_code"},
custom_commit_code => $ARGS{"Scrip-new-custom_commit_code"},
custom_is_applicable_code => $ARGS{"Scrip-new-custom_is_applicable_code"},
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips Fri Jul 11 10:33:11 2008
@@ -113,7 +113,7 @@
my $dir_path = $m->request_comp->dir_path;
$format ||= qq{'<a href="__WebPath__$dir_path/Scrip.html?id=__id__&Queue=$id">__id__</a>/TITLE:#'}
- .qq{,'<a href="__WebPath__$dir_path/Scrip.html?id=__id__&Queue=$id">__Description__</a>/TITLE:Description'}
+ .qq{,'<a href="__WebPath__$dir_path/Scrip.html?id=__id__&Queue=$id">__description__</a>/TITLE:description'}
.q{,__Stage__, __Condition__, __Action__, __Template__};
# }}}
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips Fri Jul 11 10:33:11 2008
@@ -62,8 +62,8 @@
<%init>
my $format = q{'<a href="__WebPath__/Admin/Global/Scrip.html?id=__id__&Queue=0">__id__</a>/TITLE:#'}
- .q{,'<a href="__WebPath__/Admin/Global/Scrip.html?id=__id__&Queue=0">__AutoDescription__</a>/TITLE:Condition, Action and Template'}
- .q{__NEWLINE__,'','<small>__Description__</small>'};
+ .q{,'<a href="__WebPath__/Admin/Global/Scrip.html?id=__id__&Queue=0">__Autodescription__</a>/TITLE:Condition, Action and Template'}
+ .q{__NEWLINE__,'','<small>__description__</small>'};
my $Scrips = RT::Scrips->new;
$Scrips->limit_toGlobal;
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html Fri Jul 11 10:33:11 2008
@@ -129,7 +129,7 @@
my $self = shift;
# transform list of "SearchID-PrivacyObjType-PrivacyObjID"s to
- # list of [Privacy, SearchID, Description]s
+ # list of [Privacy, SearchID, description]s
my $searches = [ map {
[ reverse(split /-/, $_, 2), $desc_of{$_} ]
} @{ $self->{Current} } ];
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html Fri Jul 11 10:33:11 2008
@@ -82,7 +82,7 @@
my ($ok, $msg) = $DashboardObj->LoadById($id);
Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)) if !$ok;
-my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'});
+my $SubscriptionObj = RT::Model::Attribute->new($session{'CurrentUser'});
my $Loaded = 0;
# try to load the subscription to this id
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html Fri Jul 11 10:33:11 2008
@@ -176,7 +176,7 @@
use RT::Dashboard;
my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'});
-my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'});
+my $SubscriptionObj = RT::Model::Attribute->new($session{'CurrentUser'});
# first let's see if we already have a subscription to this DashboardId
for my $sub ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) {
@@ -238,7 +238,7 @@
my ($val, $msg) = $SubscriptionObj->Create(
Name => 'Subscription',
- Description => 'Subscription to dashboard ' . $DashboardId,
+ description => 'Subscription to dashboard ' . $DashboardId,
ContentType => 'storable',
Object => $session{'CurrentUser'}->UserObj,
Content => \%fields,
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Scrip/ColumnMap
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Scrip/ColumnMap (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/RT__Scrip/ColumnMap Fri Jul 11 10:33:11 2008
@@ -76,7 +76,7 @@
title => 'Template',
value => sub { return $_[0]->loc( $_[0]->TemplateObj->Name ) },
},
- AutoDescription => {
+ Autodescription => {
title => 'Condition, Action and Template',
value => sub { return $_[0]->loc( "[_1] [_2] with template [_3]",
$_[0]->loc($_[0]->ConditionObj->Name),
@@ -86,7 +86,7 @@
},
};
-foreach my $col( qw(Description Stage) ) {
+foreach my $col( qw(description Stage) ) {
$COLUMN_MAP->{ $col } = { attribute => $col, value => sub { return $_[0]->$col() } };
}
</%ONCE>
Modified: rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches Fri Jul 11 10:33:11 2008
@@ -53,7 +53,7 @@
<& selectsearch_object, name => 'SavedSearchOwner', objects => \@objects, object => ( $object && $object->id ) ? $object->object : '' &>
<br />
<&|/l&>description</&>:
-<input size="25" name="SavedSearchDescription" value="<% $description || '' %>" />
+<input size="25" name="saved_search_description" value="<% $description || '' %>" />
% if ($Id ne 'new') {
<nobr>
@@ -117,7 +117,7 @@
# If we're modifying an old query, check if it's been changed
my $Dirty = $is_dirty->(
Query => $CurrentSearch,
- SavedSearch => { id => $id, object => $object, Description => $Description },
+ SavedSearch => { id => $id, object => $object, description => $description },
SearchFields => \@SearchFields,
);
@@ -128,7 +128,7 @@
$id => 'new'
$object => undef
$type => 'Ticket'
-$Description => ''
+$description => ''
$CurrentSearch => {}
@SearchFields => ()
$AllowCopy => 1
@@ -145,7 +145,7 @@
$SavedSearch->{'id'} = $ARGS{'SavedSearchId'} || 'new';
-$SavedSearch->{'description'} = $ARGS{'SavedSearchDescription'} || undef;
+$SavedSearch->{'description'} = $ARGS{'saved_search_description'} || undef;
$SavedSearch->{'Privacy'} = $ARGS{'SavedSearchOwner'} || undef;
my @results;
@@ -184,10 +184,10 @@
elsif ( $ARGS{'SavedSearchCopy'} ) {
my ($container, $id ) = _parse_saved_search( $ARGS{'SavedSearchid'} );
$SavedSearch->{'object'} = $container->Attributes->Withid( $id );
- if ( $ARGS{'SavedSearchDescription'} && $ARGS{'SavedSearchDescription'} ne $SavedSearch->{'object'}->Description ) {
- $SavedSearch->{'description'} = $ARGS{'SavedSearchDescription'};
+ if ( $ARGS{'saved_search_description'} && $ARGS{'saved_search_description'} ne $SavedSearch->{'object'}->description ) {
+ $SavedSearch->{'description'} = $ARGS{'saved_search_description'};
} else {
- $SavedSearch->{'description'} = _( "%1 copy", $SavedSearch->{'object'}->Description );
+ $SavedSearch->{'description'} = _( "%1 copy", $SavedSearch->{'object'}->description );
}
$SavedSearch->{'id'} = 'new';
$SavedSearch->{'object'} = undef;
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties Fri Jul 11 10:33:11 2008
@@ -95,11 +95,11 @@
% } }
</select><br />
-% if ( RT::Link->can('Description' ) ) {
+% if ( RT::Link->can('description' ) ) {
% my $checked = '';
-% $checked = 'checked="checked"' if $ShowLinkDescriptions;
+% $checked = 'checked="checked"' if $show_link_descriptions;
Show link descriptions:
-<input type="checkbox" name="ShowLinkDescriptions" value="1" <% $checked |n %> />
+<input type="checkbox" name="show_link_descriptions" value="1" <% $checked |n %> />
<br />
% }
@@ -129,7 +129,7 @@
@ShowLinks => ('MemberOf', 'DependsOn', 'RefersTo')
$MaxDepth => 3
$FillUsing => ''
-$ShowLinkDescriptions => 0
+$show_link_descriptions => 0
</%ARGS>
<%INIT>
require RT::Graph::Tickets;
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/index.html Fri Jul 11 10:33:11 2008
@@ -78,7 +78,7 @@
use RT::Graph::Tickets;
my @results;
-my @save_arguments = qw(id Direction LeadingLink ShowLinks MaxDepth FillUsing ShowLinkDescriptions);
+my @save_arguments = qw(id Direction LeadingLink ShowLinks MaxDepth FillUsing show_link_descriptions);
foreach my $level ( 0 .. 6 ) {
push @save_arguments, "Level-". $level ."-Properties";
}
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/FinalizeWidgetArguments Fri Jul 11 10:33:11 2008
@@ -49,7 +49,7 @@
my %args = %$WidgetArguments;
%args = (%args, %{ $args{Callback}->() }) if $args{Callback};
- $args{'Description'} = loc( $args{'Description'} ) if $args{'Description'};
+ $args{'description'} = loc( $args{'description'} ) if $args{'description'};
if ( $args{'ValuesLabel'} ) {
while (my ($k, $v) = each %{ $args{'ValuesLabel'} } ) {
$args{'ValuesLabel'}->{$k} = loc( $args{'ValuesLabel'}->{$k} );
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Boolean
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Boolean (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Boolean Fri Jul 11 10:33:11 2008
@@ -49,7 +49,7 @@
see docs/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $name %>" class="widget">
-<span class="label description"><% $Description %></span>
+<span class="label description"><% $description %></span>
<span class="value"><& SELF:InputOnly, %ARGS &></span>
<span class="hints"><% $Hints %></span>
<%ARGS>
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Integer
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Integer (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Integer Fri Jul 11 10:33:11 2008
@@ -49,7 +49,7 @@
see docs/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $name %>" class="widget">
-<span class="label description"><% $Description %></span>
+<span class="label description"><% $description %></span>
<span class="value"><& SELF:InputOnly, %ARGS &></span>
% if ( $default ) {
<span class="comment"><% $default_label %></span>
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Select
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Select (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/Select Fri Jul 11 10:33:11 2008
@@ -50,7 +50,7 @@
</%DOC>
<div id="form-box-<% lc $name %>" class="widget">
% if ( $description ) {
-<span class="label"><% $Description %></span>
+<span class="label"><% $description %></span>
% }
<span class="value"><& SELF:InputOnly, %ARGS &></span>
</div>
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/Form/String Fri Jul 11 10:33:11 2008
@@ -49,7 +49,7 @@
see docs/using_forms_widgets.pod
</%DOC>
<div id="form-box-<% lc $Name %>" class="widget">
-<span class="description label"><% $Description %></span>
+<span class="description label"><% $description %></span>
<span class="value"><& SELF:InputOnly, %ARGS &></span>
% if ( $Default ) {
<span class="comment"><% $DefaultLabel %></span>
@@ -59,7 +59,7 @@
<%ARGS>
$Name
-$Description => undef,
+$description => undef,
$Hints => ''
$CurrentValue => '',
Modified: rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Widgets/SavedSearch Fri Jul 11 10:33:11 2008
@@ -90,21 +90,21 @@
if ( $args->{SavedSearchSave} ) {
if ( my $search = $self->{CurrentSearch}{object} ) {
# rename
- $search->set_description( $args->{SavedSearchDescription} );
- push @actions, _($self->{SearchType}).loc( ' %1 renamed to %2.', $self->{CurrentSearch}{Description}, $args->{SavedSearchDescription} );
+ $search->set_description( $args->{saved_search_description} );
+ push @actions, _($self->{SearchType}).loc( ' %1 renamed to %2.', $self->{CurrentSearch}{description}, $args->{saved_search_description} );
}
else {
# new saved search
my $saved_search = RT::SavedSearch->new();
my ( $ok, $search_msg ) = $saved_search->save(
Privacy => $args->{'SavedSearchOwner'},
- name => $args->{'SavedSearchDescription'},
+ name => $args->{'saved_search_description'},
type => $self->{'SearchType'},
search_params => $search_params
);
if ($ok) {
$self->{CurrentSearch}{object} = $saved_search->{Attribute};
- push @actions, _($self->{SearchType})._( ' %1 saved.', $args->{SavedSearchDescription} );
+ push @actions, _($self->{SearchType})._( ' %1 saved.', $args->{saved_search_description} );
} else {
push @actions,
[ _("Can't save %1", _($self->{SearchType})) . ': ' . _($search_msg), 0 ];
Modified: rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t Fri Jul 11 10:33:11 2008
@@ -25,7 +25,7 @@
$m->follow_link_ok( text => 'Scrips' );
$m->follow_link_ok( text => 'New scrip' );
$m->form_number(3);
- $m->field('Scrip-new-Description' => 'On transaction, record updates');
+ $m->field('Scrip-new-description' => 'On transaction, record updates');
$m->select('Scrip-new-scrip_condition' => 'On Transaction');
$m->select('Scrip-new-scrip_action' => 'User Defined');
$m->select('Scrip-new-Template' => 'Global template: Blank');
@@ -38,7 +38,7 @@
($sid) = ($m->content =~ /Scrip\s*#(\d+)/);
my $form = $m->form_number(3);
- is $m->value("Scrip-$sid-Description"), 'On transaction, record updates', 'correct description';
+ is $m->value("Scrip-$sid-description"), 'On transaction, record updates', 'correct description';
is value_name($form, "Scrip-$sid-scrip_condition"), 'On Transaction', 'correct condition';
is value_name($form, "Scrip-$sid-scrip_action"), 'User Defined', 'correct action';
is value_name($form, "Scrip-$sid-Template"), 'Global template: Blank', 'correct template';
More information about the Rt-commit
mailing list