#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
# Make upgrade scripts executable if they are in the source.
#
- # Note that we use the deprecated (by GNU/POSIX find) -perm +0NNN syntax
- # instead of -perm /0NNN since BSD find doesn't support the latter.
- ( cd etc/upgrade && find . -type f -not -name '*.in' -perm +0111 -print ) | while read file ; do \
+ ( cd etc/upgrade && find . -type f -not -name '*.in' -perm @FINDPERM@0111 -print ) | while read file ; do \
chmod a+x "$(DESTDIR)$(RT_ETC_PATH)/upgrade/$$file" ; \
done
upgrade path guaranteed
o Apache version 1.3.x or 2.x (http://httpd.apache.org)
- with mod_perl -- (http://perl.apache.org)
- or with FastCGI -- (http://www.fastcgi.com)
- or other webserver with FastCGI support
+ with FastCGI -- (http://www.fastcgi.com)
+ or mod_perl -- (http://perl.apache.org)
+ or another webserver with FastCGI support
RT's FastCGI handler needs to access RT's configuration file.
If you are upgrading from a previous version of RT, please review
the upgrade notes for the appropriate versions, which can be found
in docs/UPGRADING-* If you are coming from 4.0.x to 4.2.x you should
- review both the UPGRADING-4.0 and UPGRADING-4.2 file. Similarly, if
- you were coming from 3.8.x, you would want to review UPGRADING-3.8,
- UPGRADING-4.0 and UPGRADING-4.2
+ review both the UPGRADING-4.0 and UPGRADING-4.2 files. Similarly, if
+ you were coming from 3.8.x, you would want to review the UPGRADING-3.8,
+ UPGRADING-4.0 and UPGRADING-4.2 documents.
Any upgrade steps given in version-specific UPGRADING files should
be run after the rest of the steps below; however, please read the
- relevant documentation before beginning the upgrade, soas to be
+ relevant documentation before beginning the upgrade, so as to be
aware of important changes.
RT stores the arguments given to ./configure at the top of the
You should back up your database before running this command.
When you run it, you will be prompted for your previous version of
- RT (such as 3.8.1) so that the appropriate set of database
+ RT (such as 4.0.23) so that the appropriate set of database
upgrades can be applied.
If 'make upgrade-database' completes without error, your upgrade
perldoc /opt/rt4/bin/rt-mailgate
+11) Set up automatic backups for RT and its data as described in
+ the docs/backups.pod document.
+
GETTING HELP
------------
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
use RT::Interface::CLI qw(GetCurrentUser loc);
-my ( $search, $condition, $action, $search_arg, $condition_arg, $action_arg,
+my ( $search, $condition, $actions, $search_arg, $condition_arg, $actions_arg,
$template, $template_id, $transaction, $transaction_type, $help, $log, $verbose );
GetOptions(
"search=s" => \$search,
"search-arg=s" => \$search_arg,
"condition=s" => \$condition,
"condition-arg=s" => \$condition_arg,
- "action-arg=s" => \$action_arg,
- "action=s" => \$action,
+ "action-arg=s@" => \$actions_arg,
+ "action=s@" => \$actions,
"template=s" => \$template,
"template-id=s" => \$template_id,
"transaction=s" => \$transaction,
exit(1);
}
-help() unless $search && $action;
+help() unless $search && $actions;
$transaction = lc( $transaction||'' );
if ( $transaction && $transaction !~ /^(first|all|last)$/i ) {
# We _must_ have a search object
load_module($search);
-load_module($action) if ($action);
+for my $action (@$actions) {
+ load_module($action);
+}
load_module($condition) if ($condition);
my $void_scrip = RT::Scrip->new( $CurrentUser );
print "\t".loc("Condition matches...")."\n" if $verbose;
}
- #prepare our action
- my $action_obj = $action->new(
- TicketObj => $ticket,
- TransactionObj => $transaction,
- TemplateObj => $template_obj,
- Argument => $action_arg,
- ScripObj => $void_scrip,
- ScripActionObj => $void_scrip_action,
- CurrentUser => $CurrentUser,
- );
+ my $i = 0;
+ for my $action (@$actions) {
- #if our preparation, move onto the next ticket
- return unless $action_obj->Prepare;
- print "\t".loc("Action prepared...")."\n" if $verbose;
+ # Given the current index of the actions array, see
+ # if there is still a corresponding element in the
+ # actions_arg array. If so, then use that argument,
+ # else use undef.
+ my $action_argument = ($i <= $#$actions_arg) ? $actions_arg->[$i] : undef;
+ $i++;
- #commit our action.
- return unless $action_obj->Commit;
- print "\t".loc("Action committed.")."\n" if $verbose;
+ # prepare our action
+ my $action_obj = $action->new(
+ TicketObj => $ticket,
+ TransactionObj => $transaction,
+ TemplateObj => $template_obj,
+ Argument => $action_argument,
+ ScripObj => $void_scrip,
+ ScripActionObj => $void_scrip_action,
+ CurrentUser => $CurrentUser,
+ );
+
+ # if our preparation failed, move onto the next action
+ next unless $action_obj->Prepare;
+ print "\t".loc("Action prepared...")."\n" if $verbose;
+
+ # commit our action.
+ next unless $action_obj->Commit;
+ print "\t".loc("Action committed.")."\n" if $verbose;
+ }
}
# =head2 get_transactions
. loc( "[_1] - An argument to pass to [_2]", "--condition-arg", "--condition" )
. "\n";
print " "
- . loc( "[_1] - Specify the action module you want to use", "--action" )
+ . loc( "[_1] - Specify the action module you want to use. This option may be repeated to apply multiple actions to found tickets.", "--action" )
. "\n";
print " "
- . loc( "[_1] - An argument to pass to [_2]", "--action-arg", "--action" )
+ . loc( "[_1] - An argument to pass to [_2]. This option may be repeated to pass corresponding arguments to multiple calls of [_2].", "--action-arg", "--action" )
. "\n";
print " "
. loc( "[_1] - Specify name or id of template(s) you want to use", "--template" )
print " bin/rt-crontool \\\n";
print " --search RT::Search::ActiveTicketsInQueue --search-arg general \\\n";
print" --action RT::Action::EscalatePriority\n";
-
-
-
-
-
exit(0);
}
=item action
-Specify the action module you want to use
+Specify the action module you want to use. This option may be repeated to apply multiple actions to found tickets.
=item action-arg
-An argument to pass to --action
+An argument to pass to --action. This option may be repeated to pass corresponding arguments to multiple calls of --action.
=item template
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#! /bin/sh
# From configure.ac Revision.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for RT rt-4.2.12.
+# Generated by GNU Autoconf 2.69 for RT rt-4.2.13.
#
# Report bugs to <rt-bugs@bestpractical.com>.
#
# Identity of this package.
PACKAGE_NAME='RT'
PACKAGE_TARNAME='rt'
-PACKAGE_VERSION='rt-4.2.12'
-PACKAGE_STRING='RT rt-4.2.12'
+PACKAGE_VERSION='rt-4.2.13'
+PACKAGE_STRING='RT rt-4.2.13'
PACKAGE_BUGREPORT='rt-bugs@bestpractical.com'
PACKAGE_URL=''
exp_exec_prefix
exp_prefix
WEB_HANDLER
+FINDPERM
PERL
INSTALL_DATA
INSTALL_SCRIPT
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures RT rt-4.2.12 to adapt to many kinds of systems.
+\`configure' configures RT rt-4.2.13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of RT rt-4.2.12:";;
+ short | recursive ) echo "Configuration of RT rt-4.2.13:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-RT configure rt-4.2.12
+RT configure rt-4.2.13
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by RT $as_me rt-4.2.12, which was
+It was created by RT $as_me rt-4.2.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
rt_version_minor=2
-rt_version_patch=12
+rt_version_patch=13
test "x$rt_version_major" = 'x' && rt_version_major=0
test "x$rt_version_minor" = 'x' && rt_version_minor=0
as_fn_error $? "cannot use $PACKAGE_NAME without perl" "$LINENO" 5
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking version of find" >&5
+$as_echo_n "checking checking version of find... " >&6; }
+if find --version 2>&1 | grep 'GNU'; then :
+ FINDPERM="/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring for GNU find" >&5
+$as_echo "configuring for GNU find" >&6; }
+else
+ FINDPERM="+"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring for BSD find" >&5
+$as_echo "configuring for BSD find" >&6; }
+fi
+
+
# Check whether --with-web-handler was given.
ac_config_files="$ac_config_files etc/upgrade/3.8-ical-extension etc/upgrade/4.0-customfield-checkbox-extension etc/upgrade/generate-rtaddressregexp etc/upgrade/sanity-check-stylesheets etc/upgrade/shrink-cgm-table etc/upgrade/shrink-transactions-table etc/upgrade/split-out-cf-categories etc/upgrade/switch-templates-to etc/upgrade/time-worked-history etc/upgrade/upgrade-articles etc/upgrade/vulnerable-passwords sbin/rt-attributes-viewer sbin/rt-preferences-viewer sbin/rt-session-viewer sbin/rt-dump-metadata sbin/rt-setup-database sbin/rt-test-dependencies sbin/rt-email-digest sbin/rt-email-dashboards sbin/rt-clean-sessions sbin/rt-shredder sbin/rt-validator sbin/rt-validate-aliases sbin/rt-email-group-admin sbin/rt-server sbin/rt-server.fcgi sbin/standalone_httpd sbin/rt-setup-fulltext-index sbin/rt-fulltext-indexer sbin/rt-serializer sbin/rt-importer bin/rt-crontool bin/rt-mailgate bin/rt"
-ac_config_files="$ac_config_files Makefile etc/RT_Config.pm lib/RT/Generated.pm t/data/configs/apache2.2+mod_perl.conf t/data/configs/apache2.2+fastcgi.conf"
+ac_config_files="$ac_config_files Makefile etc/RT_Config.pm lib/RT/Generated.pm t/data/configs/apache2.2+mod_perl.conf t/data/configs/apache2.2+fastcgi.conf t/data/configs/apache2.4+mod_perl.conf t/data/configs/apache2.4+fastcgi.conf"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by RT $as_me rt-4.2.12, which was
+This file was extended by RT $as_me rt-4.2.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-RT config.status rt-4.2.12
+RT config.status rt-4.2.13
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
"lib/RT/Generated.pm") CONFIG_FILES="$CONFIG_FILES lib/RT/Generated.pm" ;;
"t/data/configs/apache2.2+mod_perl.conf") CONFIG_FILES="$CONFIG_FILES t/data/configs/apache2.2+mod_perl.conf" ;;
"t/data/configs/apache2.2+fastcgi.conf") CONFIG_FILES="$CONFIG_FILES t/data/configs/apache2.2+fastcgi.conf" ;;
+ "t/data/configs/apache2.4+mod_perl.conf") CONFIG_FILES="$CONFIG_FILES t/data/configs/apache2.4+mod_perl.conf" ;;
+ "t/data/configs/apache2.4+fastcgi.conf") CONFIG_FILES="$CONFIG_FILES t/data/configs/apache2.4+fastcgi.conf" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
AC_MSG_ERROR([cannot use $PACKAGE_NAME without perl])
fi
+dnl BSD find uses -perm +xxxx, GNU find has deprecated this syntax in favour of
+dnl -perm /xxx.
+AC_MSG_CHECKING([checking version of find])
+AS_IF([find --version 2>&1 | grep 'GNU'],
+ [ FINDPERM="/"
+ AC_MSG_RESULT([configuring for GNU find]) ],
+ [ FINDPERM="+"
+ AC_MSG_RESULT([configuring for BSD find]) ])
+
+AC_SUBST([FINDPERM])
dnl WEB_HANDLER
AC_ARG_WITH(web-handler,
etc/RT_Config.pm
lib/RT/Generated.pm
t/data/configs/apache2.2+mod_perl.conf
- t/data/configs/apache2.2+fastcgi.conf],
+ t/data/configs/apache2.2+fastcgi.conf
+ t/data/configs/apache2.4+mod_perl.conf
+ t/data/configs/apache2.4+fastcgi.conf],
)
AC_OUTPUT
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
COPYRIGHT:
-This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
<sales@bestpractical.com>
(Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
=cut
__DATA__
+Listen $PORT
+<IfDefine SSL>
+ Listen $SSL
+</IfDefine>
+
+ServerName localhost
+ServerRoot $RTHOME/var
+PidFile $RTHOME/var/apache2.pid
+<IfVersion < 2.4>
+ LockFile $RTHOME/var/apache2.lock
+</IfVersion>
+ServerAdmin root@localhost
+
+<IfVersion >= 2.4>
+ LoadModule mpm_prefork_module $MODULES/mod_mpm_prefork.so
+ LoadModule authz_core_module $MODULES/mod_authz_core.so
+</IfVersion>
+LoadModule authz_host_module $MODULES/mod_authz_host.so
+LoadModule env_module $MODULES/mod_env.so
+LoadModule alias_module $MODULES/mod_alias.so
+LoadModule mime_module $MODULES/mod_mime.so
+TypesConfig $TOOLS/mime.types
+
<IfDefine SINGLE>
<IfModule mpm_prefork_module>
StartServers 1
</IfModule>
</IfDefine>
-Listen $PORT
-<IfDefine SSL>
- Listen $SSL
-</IfDefine>
-
-ServerName localhost
-ServerRoot $RTHOME/var
-PidFile $RTHOME/var/apache2.pid
-LockFile $RTHOME/var/apache2.lock
-ServerAdmin root@localhost
-
-LoadModule authz_host_module $MODULES/mod_authz_host.so
-LoadModule env_module $MODULES/mod_env.so
-LoadModule alias_module $MODULES/mod_alias.so
-LoadModule mime_module $MODULES/mod_mime.so
-TypesConfig $TOOLS/mime.types
-
<IfDefine PERL>
LoadModule perl_module $MODULES/mod_perl.so
</IfDefine>
</IfDefine>
<IfDefine SSL>
LoadModule ssl_module $MODULES/mod_ssl.so
+ <IfVersion >= 2.4>
+ LoadModule socache_shmcb_module $MODULES/mod_socache_shmcb.so
+ </IfVersion>
</IfDefine>
<IfModule !log_config_module>
<IfDefine PERL>
PerlSetEnv RT_SITE_CONFIG $RTHOME/etc/RT_SiteConfig.pm
<Location $PATH>
- Order allow,deny
- Allow from all
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app $RTHOME/sbin/rt-server
FastCgiServer $RTHOME/sbin/rt-server.fcgi -processes $PROCESSES -idle-timeout 300
ScriptAlias $PATH $RTHOME/sbin/rt-server.fcgi/
<Location $PATH>
- Order allow,deny
- Allow from all
Options +ExecCGI
AddHandler fastcgi-script fcgi
</Location>
FcgidMaxRequestLen 1073741824
ScriptAlias $PATH $RTHOME/sbin/rt-server.fcgi/
<Location $PATH>
- Order allow,deny
- Allow from all
Options +ExecCGI
AddHandler fcgid-script fcgi
</Location>
FastCgiServer $RTHOME/bin/mason_handler.fcgi -processes $PROCESSES -idle-timeout 300
ScriptAlias $PATH $RTHOME/bin/mason_handler.fcgi/
<Location $PATH>
- Order allow,deny
- Allow from all
Options +ExecCGI
AddHandler fastcgi-script fcgi
</Location>
FcgidMaxRequestLen 1073741824
ScriptAlias $PATH $RTHOME/bin/mason_handler.fcgi/
<Location $PATH>
- Order allow,deny
- Allow from all
Options +ExecCGI
AddHandler fcgid-script fcgi
</Location>
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512
SSLSessionCache shmcb:$RTHOME/var/ssl_scache(512000)
- SSLMutex file:$RTHOME/var/ssl_mutex
+ <IfVersion < 2.4>
+ SSLMutex file:$RTHOME/var/ssl_mutex
+ </IfVersion>
<VirtualHost *:$SSL>
SSLEngine on
SSLCertificateFile $TOOLS/localhost.crt
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
C<$DatabaseRequireSSL> has been removed, and setting it will trigger an
informational message that setting it is ineffective.
-The full-text indexing defaults for PostgreSQL have changed; GiST is now
+The full-text indexing defaults for PostgreSQL have changed; GIN is now
the suggested index, as well as storing data in a separate
AttachmentsIndex table. Both changes improve lookup speed. For
improved search performance, you may wish to drop existing C<tsvector>
-and C<GIN> indexes on C<Attachments>, and re-generate the index using
+and C<GiST> indexes on C<Attachments>, and re-generate the index using
C<rt-setup-fulltext-index>.
+=head1 UPGRADING FROM 4.2.12 AND EARLIER
+
+New deployments install an C<RT_SiteConfig.pm> that includes a C<use utf8;>
+to allow Unicode to be used in config. You may wish to add a C<use utf8;> to
+the top of your C<RT_SiteConfig.pm> if you haven't already done so.
+
=cut
This is not generally suggested, as unindexed full-text searching can
cause severe performance problems.
+=head1 LIMIT ATTACHMENT SIZE
+
+On some systems, very large attachments can cause memory and other
+performance issues for the indexer making it unable to complete
+indexing. See L<RT_Config.pm/"$MaxFulltextAttachmentSize"> for
+details on setting a maximum attachment size to index.
+
=cut
Indexed => 0,
);
+=item C<$MaxFulltextAttachmentSize>
+
+On some systems, very large attachments can cause memory and other
+performance issues for the indexer making it unable to complete
+indexing. Adding resources like memory and CPU will solve this
+issue, but in cases where that isn't possible, this option
+sets a maximum size in bytes on attachments to index. Attachments
+larger than this limit are skipped and will not be available to
+full text searches.
+
+=cut
+
+# Default 0 means no limit
+Set($MaxFulltextAttachmentSize, 0);
+
=item C<$DontSearchFileAttachments>
If C<$DontSearchFileAttachments> is set to 1, then uploaded files
Set(@ReferrerWhitelist, qw());
+=item C<%ReferrerComponents>
+
+C<%ReferrerComponents> is the hash to customize referrer checking behavior when
+C<$RestrictReferrer> is enabled, where you can whitelist or blacklist the
+components along with their query args. e.g.
+
+ Set( %ReferrerComponents,
+ ( '/Foo.html' => 1, '/Bar.html' => 0, '/Baz.html' => [ 'id', 'results' ] )
+ );
+
+With this, '/Foo.html' will be whitelisted, and '/Bar.html' will be blacklisted.
+'/Baz.html' with id/results query arguments will be whitelisted but blacklisted
+if there are other query arguments.
+
+=cut
+
+Set( %ReferrerComponents );
=item C<$BcryptCost>
=cut
-Set($BcryptCost, 10);
+Set($BcryptCost, 11);
=back
-# Any configuration directives you include here will override
+use utf8;
+
+# Any configuration directives you include here will override
# RT's default configuration file, RT_Config.pm
#
# To include a directive here, just copy the equivalent statement
# from RT_Config.pm and change the value. We've included a single
# sample value below.
#
+# If this file includes non-ASCII characters, it must be encoded in
+# UTF-8.
+#
# This file is actually a perl module, so you can include valid
# perl code, as well.
#
ALTER TABLE Transactions ADD NewReference NUMBER(11,0) NULL;
DROP INDEX transactions1;
ALTER TABLE Transactions rename column Ticket to ObjectId;
-CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
ALTER TABLE TicketCustomFieldValues rename to ObjectCustomFieldValues;
ALTER TABLE ObjectCustomFieldValues rename column Ticket to ObjectId;
ALTER TABLE ObjectCustomFieldValues ADD SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL;
-
-CREATE INDEX ObjectCustomFieldValues1 on ObjectCustomFieldValues (CustomField,ObjectType,ObjectId,Content);
-CREATE INDEX ObjectCustomFieldValues2 on ObjectCustomFieldValues (CustomField,ObjectType,ObjectId);
-
-
-
CREATE SEQUENCE OBJECTCUSTOMFIELDS_seq;
CREATE TABLE ObjectCustomFields (
id NUMBER(11,0)
alter table Transactions rename column Ticket to ObjectId;
-CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
-
alter table TicketCustomFieldValues rename to ObjectCustomFieldValues;
alter table ObjectCustomFieldValues rename column Ticket to ObjectId;
alter table objectcustomfieldvalues add column ContentEncoding varchar(80) NULL;
-create index ObjectCustomFieldValues1 on objectcustomfieldvalues (CustomField,ObjectType,ObjectId,Content);
-
-create index ObjectCustomFieldValues2 on objectcustomfieldvalues (CustomField,ObjectType,ObjectId);
-
CREATE SEQUENCE objectcustomfields_id_s;
CHANGE Ticket ObjectId integer NOT NULL DEFAULT 0;
UPDATE Transactions set ObjectType = 'RT::Ticket';
-CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
alter table TicketCustomFieldValues rename ObjectCustomFieldValues,
change Ticket ObjectId integer NOT NULL DEFAULT 0 ,
#alter table ObjectCustomFieldValues drop index ticketcustomfieldvalues1;
#alter table ObjectCustomFieldValues drop index ticketcustomfieldvalues2;
-alter table ObjectCustomFieldValues add index ObjectCustomFieldValues1 (Content),
- add index ObjectCustomFieldValues2 (CustomField,ObjectType,ObjectId);
-
-
CREATE TABLE ObjectCustomFields (
id INTEGER NOT NULL AUTO_INCREMENT,
CustomField int NOT NULL ,
+++ /dev/null
-CREATE INDEX CachedGroupMembers3 on CachedGroupMembers (MemberId, ImmediateParentId);
-
+++ /dev/null
-CREATE INDEX CachedGroupMembers3 on CachedGroupMembers (MemberId, ImmediateParentId);
-
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
+++ /dev/null
-
-CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers(GroupId, MemberId);
-
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
sub {
RT->Logger->debug('Removing all Delegate and PersonalGroup rights');
+ # this temporarily tells the system that the rights exist so it can properly canonicalize them
+ RT::System->AddRight(Admin => AdminOwnPersonalGroups => 'Add right for 4.0.1 upgrade steps');
+ RT::System->AddRight(Admin => AdminAllPersonalGroups => 'Add right for 4.0.1 upgrade steps');
+ RT::System->AddRight(Admin => DelegateRights => 'Add right for 4.0.1 upgrade steps');
+
my $acl = RT::ACL->new(RT->SystemUser);
for my $right (qw/AdminOwnPersonalGroups AdminAllPersonalGroups DelegateRights/) {
$acl->Limit( FIELD => 'RightName', VALUE => $right );
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
return (1);
}
-=head2 AddAttachments
+=head2 AttachableFromTransaction
-Takes any attachments to this transaction and attaches them to the message
-we're building.
+Function (not method) that takes an L<RT::Transaction> and returns an
+L<RT::Attachments> collection of attachments suitable for attaching to an
+email.
=cut
-sub AddAttachments {
- my $self = shift;
-
- my $MIMEObj = $self->TemplateObj->MIMEObj;
-
- $MIMEObj->head->delete('RT-Attach-Message');
+sub AttachableFromTransaction {
+ my $txn = shift;
my $attachments = RT::Attachments->new( RT->SystemUser );
$attachments->Limit(
FIELD => 'TransactionId',
- VALUE => $self->TransactionObj->Id
+ VALUE => $txn->Id
);
# Don't attach anything blank
# We want to make sure that we don't include the attachment that's
# being used as the "Content" of this message" unless that attachment's
# content type is not like text/...
- my $transaction_content_obj = $self->TransactionObj->ContentObj;
+ my $transaction_content_obj = $txn->ContentObj;
if ( $transaction_content_obj
&& $transaction_content_obj->ContentType =~ m{text/}i )
}
}
+ return $attachments;
+}
+
+=head2 AddAttachments
+
+Takes any attachments to this transaction and attaches them to the message
+we're building.
+
+=cut
+
+sub AddAttachments {
+ my $self = shift;
+
+ my $MIMEObj = $self->TemplateObj->MIMEObj;
+
+ $MIMEObj->head->delete('RT-Attach-Message');
+
+ my $attachments = AttachableFromTransaction($self->TransactionObj);
+
# attach any of this transaction's attachments
my $seen_attachment = 0;
while ( my $attach = $attachments->Next ) {
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
my $modify = $res{status_on}->head->modify;
$res{status_on}->head->modify(1);
$res{status_on}->head->add(
- "X-RT-" . $protected->{'Protocol'} . "-Status" => $res{'status'}
+ "X-RT-" . $protected->{'Protocol'} . "-Status" => Encode::encode( "UTF-8", $res{'status'} )
);
$res{status_on}->head->modify($modify);
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
}
while ( defined($_ = $io->getline) ) {
- if ( /^-----BEGIN PGP (SIGNED )?MESSAGE-----/ ) {
+ if ( /^-----BEGIN PGP (SIGNED )?MESSAGE-----\s*$/ ) {
return $1? 'signed': 'encrypted';
}
- elsif ( $check_for_signature && !/^-----BEGIN PGP SIGNATURE-----/ ) {
+ elsif ( $check_for_signature && !/^-----BEGIN PGP SIGNATURE-----\s*$/ ) {
return 'signature';
}
}
binmode $block_fh, ':raw';
while ( defined(my $str = $io->getline) ) {
- if ( $in_block && $str =~ /^-----END PGP (?:MESSAGE|SIGNATURE)-----/ ) {
+ if ( $in_block && $str =~ /^-----END PGP (?:MESSAGE|SIGNATURE)-----\s*$/ ) {
print $block_fh $str;
$in_block--;
next if $in_block > 0;
binmode $block_fh, ':raw';
$in_block = 0;
}
- elsif ( $str =~ /^-----BEGIN PGP (SIGNED )?MESSAGE-----/ ) {
+ elsif ( $str =~ /^-----BEGIN PGP (SIGNED )?MESSAGE-----\s*$/ ) {
$in_block++;
print $block_fh $str;
}
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
my $self = shift;
my $args = shift;
- my $type = $self->_Value('Type');
+ my $type = $self->__Value('Type');
return 1 unless $type;
my $method = '_CanonicalizeValue'. $type;
# Custom field values
push( @$list, $self->Values );
+# Applications of this CF
+ my $applied = RT::ObjectCustomFields->new( $self->CurrentUser );
+ $applied->LimitToCustomField( $self->Id );
+ push @$list, $applied;
+
# Ticket custom field values
my $objs = RT::ObjectCustomFieldValues->new( $self->CurrentUser );
$objs->LimitToCustomField( $self->Id );
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
return $value;
}
+sub loc { return HTML::Mason::Commands::loc(@_) };
+
our (%fill_cache, @available_colors) = ();
our %property_cb = (
- Queue => sub { return $_[0]->QueueObj->Name || $_[0]->Queue },
- CF => sub {
+ Queue => sub { return $_[0]->QueueObj->Name || $_[0]->Queue },
+ Status => sub { return loc($_[0]->Status) },
+ CF => sub {
my $values = $_[0]->CustomFieldValues( $_[1] );
return join ', ', map $_->Content, @{ $values->ItemsArrayRef };
},
);
-foreach my $field (qw(Subject Status TimeLeft TimeWorked TimeEstimated)) {
+foreach my $field (qw(Subject TimeLeft TimeWorked TimeEstimated)) {
$property_cb{ $field } = sub { return $_[0]->$field },
}
foreach my $field (qw(Creator LastUpdatedBy Owner)) {
next if $seen{ lc $cf->Name }++;
next if $cf->Type eq 'Image';
if ( $first ) {
- push @res, 'CustomFields', [];
+ push @res, 'Custom Fields', # loc
+ [];
$first = 0;
}
push @{ $res[-1] }, 'CF.{'. $cf->Name .'}';
$RT::Logger->error("Couldn't find property handler for '$key' and '@subkeys' subkeys");
next;
}
- push @fields, ($subkeys[0] || $key) .': '. $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
+ my $label = $key eq 'CF' ? $subkeys[0] : loc($key);
+ push @fields, $label .': '. $property_cb{ $key }->( $args{'Ticket'}, @subkeys );
}
return @fields;
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)