[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.9-128-g1956667

Alex Vandiver alexmv at bestpractical.com
Tue Feb 3 16:33:27 EST 2015


The branch, 4.2-trunk has been updated
       via  195666755ac957831fade67f7a86dcc712107499 (commit)
       via  6edbbf00f83fb18511b3eb22b8ede6eb2d8252f4 (commit)
       via  ce8a1f9053bc117bda267af9fa83db2af0a51a1c (commit)
       via  1dd8ffc7c8c258885dcd7ae55d318f9276af1c75 (commit)
       via  be9f5aa8554b328b47dc86d1bfe4c55871f4d4c0 (commit)
       via  17fe4b316c1253f37bfbb142d34c80969c67c74c (commit)
       via  d0231522014a0b411dcce9c344d0c3cfbfd083a7 (commit)
       via  7cb37c6fc820f279d514dda9285e9aae65296e8b (commit)
       via  b49f950ba93aa1c15671b6a867e62327928727ee (commit)
       via  850ce82e40d55c5fb85613318c82ec815961c08e (commit)
       via  9ced88246f8ff368e0877c454fb70b81b654d673 (commit)
       via  f3b9322847bfaaa8f01ec722e15a0b9308a1da90 (commit)
       via  f53cbd1d24394906a2de5a3bd05fdca5889c5d8b (commit)
       via  0d733982b739798080e1262db60551f0af1d9961 (commit)
       via  fa52686ac781509d22a3d838f3b80a47f463a287 (commit)
       via  23ca30698334236b412ba077a7b62c478e6bdc6f (commit)
       via  b408e9ba413a22f598cdaeaaed5607a33ed784fc (commit)
       via  4db45733c2b4af1c2fdfe94553c0a092f86de476 (commit)
       via  80c3b30799af3d984b0b65c7ad87e49a6018e74b (commit)
       via  172cb30e889db86ec47f1c515efc11b0c19fe666 (commit)
       via  63e616327ae8fa397ddb9a1d7822722d34ae3d59 (commit)
       via  b8b9c297af739339369a50d0a3c9d5fc33497356 (commit)
       via  68ec098392949e7ef8299cb2172053c8867fc9b6 (commit)
       via  eaaf32d119efb5f3840f5d4dcc486e2ba9fe5109 (commit)
       via  991c172f82a8e064fcb9e3a4ce1ecfbc91391a8a (commit)
       via  c6eacb20a533386d562e35109df22c6e0712fe4d (commit)
       via  a2a96a2b26c2e524836c8698710b16334c478576 (commit)
       via  542ebd3a6d0561522db13f6685c9ad8a4d36ee0b (commit)
       via  55ec22aa1784f5dac54d2281abd658973b274c48 (commit)
       via  ddb2cf9d76b68d18055e4de1b7a71c5867876fd9 (commit)
       via  11d5c735f4e7c1ba9ab00613a1f16f16ed51b46f (commit)
       via  cd52b35ea0551f7345127134a199d08874052df7 (commit)
       via  3c7db05073772e167d6ea4ed31330f320cea72ab (commit)
       via  ebc94047bda030bd6881d641d1eab796197fe15e (commit)
      from  888d3384aead9191229c165c7bbb8fb85a8c62ea (commit)

Summary of changes:
 README                                    | 10 +++++--
 bin/rt.in                                 |  4 +--
 docs/UPGRADING.mysql                      |  4 ++-
 docs/writing_portlets.pod                 | 46 +++++++++++++++++++++++++++++++
 lib/RT/Action/CreateTickets.pm            |  7 +++++
 lib/RT/Action/SendEmail.pm                |  1 +
 lib/RT/Attachment.pm                      |  4 +--
 lib/RT/Config.pm                          |  2 +-
 lib/RT/EmailParser.pm                     |  2 ++
 lib/RT/Record.pm                          |  1 -
 lib/RT/Shredder.pm                        |  2 +-
 lib/RT/Shredder/Plugin/Users.pm           |  4 +--
 lib/RT/Test.pm                            |  2 +-
 lib/RT/Transaction.pm                     |  2 --
 sbin/rt-fulltext-indexer.in               |  5 +++-
 sbin/rt-validator.in                      |  4 +--
 share/html/Admin/Tools/Configuration.html |  2 +-
 share/html/Elements/QuickCreate           | 16 +++++++----
 share/html/Elements/TSVExport             |  2 ++
 share/html/Ticket/Create.html             |  1 +
 share/html/Ticket/ModifyAll.html          |  1 +
 share/html/Ticket/ModifyPeople.html       |  1 +
 share/html/User/Prefs.html                |  3 +-
 share/html/index.html                     | 19 +++++++++----
 t/api/emailparser.t                       |  8 ++++--
 t/fts/indexed_pg.t                        | 14 +++++++---
 26 files changed, 126 insertions(+), 41 deletions(-)
 create mode 100644 docs/writing_portlets.pod

- Log -----------------------------------------------------------------
commit 195666755ac957831fade67f7a86dcc712107499
Merge: 888d338 6edbbf0
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Feb 3 16:01:02 2015 -0500

    Merge branch '4.0-trunk' into 4.2-trunk
    
    Most of the below conflicts are due to M/D conflicts due to updated year
    in the license tag.
    
    Conflicts:
    	README
    	devel/tools/factory
    	lib/RT/Shredder/Plugin/Users.pm
    	lib/RT/Tickets_SQL.pm
    	sbin/rt-message-catalog
    	share/html/Admin/Elements/EditScrip
    	share/html/Admin/Elements/ListGlobalCustomFields
    	share/html/Admin/Elements/PickCustomFields
    	share/html/Admin/Elements/SelectRights
    	share/html/Elements/QuickCreate
    	share/html/Elements/SelectTicketTypes
    	share/html/NoAuth/RichText/dhandler
    	share/html/NoAuth/css/aileron/base.css
    	share/html/NoAuth/css/aileron/forms.css
    	share/html/NoAuth/css/aileron/images/dhandler
    	share/html/NoAuth/css/aileron/layout.css
    	share/html/NoAuth/css/aileron/main.css
    	share/html/NoAuth/css/aileron/misc.css
    	share/html/NoAuth/css/aileron/msie.css
    	share/html/NoAuth/css/aileron/msie6.css
    	share/html/NoAuth/css/aileron/ticket.css
    	share/html/NoAuth/css/ballard/base.css
    	share/html/NoAuth/css/ballard/images/dhandler
    	share/html/NoAuth/css/ballard/layout.css
    	share/html/NoAuth/css/ballard/main.css
    	share/html/NoAuth/css/ballard/misc.css
    	share/html/NoAuth/css/ballard/msie6.css
    	share/html/NoAuth/css/ballard/ticket.css
    	share/html/NoAuth/css/base/admin.css
    	share/html/NoAuth/css/base/articles.css
    	share/html/NoAuth/css/base/collection.css
    	share/html/NoAuth/css/base/login.css
    	share/html/NoAuth/css/base/main.css
    	share/html/NoAuth/css/base/misc.css
    	share/html/NoAuth/css/base/msie6.css
    	share/html/NoAuth/css/base/nav.css
    	share/html/NoAuth/css/base/portlets.css
    	share/html/NoAuth/css/base/theme-editor.css
    	share/html/NoAuth/css/base/ticket-form.css
    	share/html/NoAuth/css/base/ticket.css
    	share/html/NoAuth/css/base/tools.css
    	share/html/NoAuth/css/print.css
    	share/html/NoAuth/css/web2/base.css
    	share/html/NoAuth/css/web2/images/dhandler
    	share/html/NoAuth/css/web2/main.css
    	share/html/NoAuth/css/web2/misc.css
    	share/html/NoAuth/css/web2/msie6.css
    	share/html/NoAuth/css/web2/ticket.css
    	share/html/NoAuth/images/autohandler
    	share/html/NoAuth/js/jquery-ui-patch-datepicker.js
    	share/html/NoAuth/js/jquery_noconflict.js
    	share/html/NoAuth/js/late.js
    	share/html/NoAuth/js/userautocomplete.js
    	share/html/REST/1.0/search/ticket
    	share/html/Search/Graph.html
    	share/html/Search/Results.tsv
    	share/html/Ticket/Elements/ShowDependencies
    	share/html/Ticket/Elements/ShowHistory
    	share/html/Ticket/Elements/ShowTransaction
    	share/html/Ticket/Elements/ShowUserEntry
    	share/html/Ticket/ModifyPeople.html
    	share/html/Tools/Offline.html
    	share/static/css/aileron/boxes.css
    	share/static/css/aileron/nav.css
    	share/static/css/aileron/ticket-lists.css
    	share/static/css/aileron/ticket-search.css
    	share/static/css/ballard/boxes.css
    	share/static/css/ballard/msie.css
    	share/static/css/ballard/nav.css
    	share/static/css/ballard/ticket-lists.css
    	share/static/css/ballard/ticket-search.css
    	share/static/css/base/forms.css
    	share/static/css/base/rights-editor.css
    	share/static/css/mobile.css
    	share/static/css/web2/boxes.css
    	share/static/css/web2/layout.css
    	share/static/css/web2/msie.css
    	share/static/css/web2/nav.css
    	share/static/css/web2/ticket-lists.css
    	share/static/css/web2/ticket-search.css
    	share/static/js/cascaded.js
    	share/static/js/combobox.js
    	share/static/js/util.js

diff --cc README
index 1a403e3,5a4b923..bdd8e09
--- a/README
+++ b/README
@@@ -66,13 -66,15 +66,15 @@@ GENERAL INSTALLATIO
  
      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 3.8.6 to 4.0.x you should
 -    review both the UPGRADING-3.8 and UPGRADING-4.0 file.  Similarly, if
 -    you were coming from 3.6.7, you would want to review UPGRADING-3.6,
 -    UPGRADING-3.8 and UPGRADING-4.0
 +    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
  
-     It is particularly important that you read the warnings at the top of
-     UPGRADING-4.0 for some common issues.
+     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
+     aware of important changes.
  
      RT stores the arguments given to ./configure at the top of the
      etc/RT_Config.pm file in case you need to recreate your previous use
@@@ -157,11 -168,17 +159,13 @@@
  
        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.6.4) so that the appropriate set of database
 +      RT (such as 3.8.1) so that the appropriate set of database
        upgrades can be applied.
  
 -      Finally, clear the Mason cache dir:
 -
 -          rm -fr /opt/rt4/var/mason_data/obj
 -
        If 'make upgrade-database' completes without error, your upgrade
-       has been successful and you may restart your webserver.
+       has been successful; you should now run any commands that were
+       supplied in version-specific UPGRADING documentation.  You should
+       then restart your webserver.
  
   7) Configure the web server, as described in docs/web_deployment.pod,
      and the email gateway, as described below.
diff --cc lib/RT/Action/SendEmail.pm
index c933731,c668d15..cee612e
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@@ -610,9 -616,10 +610,10 @@@ sub SetRTSpecialHeaders 
  # XXX, TODO: use /ShowUser/ShowUserEntry(or something like that) when it would be
  #            refactored into user's method.
      if ( my $email = $self->TransactionObj->CreatorObj->EmailAddress
+          and ! defined $self->TemplateObj->MIMEObj->head->get("RT-Originator")
           and RT->Config->Get('UseOriginatorHeader')
      ) {
 -        $self->SetHeader( 'RT-Originator', $email );
 +        $self->SetHeader( 'X-RT-Originator', $email );
      }
  
  }
diff --cc lib/RT/Shredder/Plugin/Users.pm
index ebba0d1,2f6fbd9..7e1c31f
--- a/lib/RT/Shredder/Plugin/Users.pm
+++ b/lib/RT/Shredder/Plugin/Users.pm
@@@ -79,14 -79,9 +79,14 @@@ be selected for deletion. Identifier i
  or id of a group, as well C<Privileged> or <unprivileged> can used
  to select people from system groups.
  
 +=head2 not_member_of - group identifier
 +
 +Like member_of, but selects users who are not members of the provided
 +group.
 +
  =head2 replace_relations - user identifier
  
- When you delete an user there could be minor links to them in the RT database.
+ When you delete a user there could be minor links to them in the RT database.
  This option allow you to replace these links with links to the new user.
  The replaceable links are Creator and LastUpdatedBy, but NOT any watcher roles.
  This means that if the user is a watcher(Requestor, Owner,
diff --cc share/html/Elements/QuickCreate
index b3d0d6f,fa03f20..b016314
--- a/share/html/Elements/QuickCreate
+++ b/share/html/Elements/QuickCreate
@@@ -68,7 -69,7 +69,7 @@@
  </tr>
  <tr class="input-row">
      <td class="label"><&|/l&>Requestors</&>:</td>
-     <td colspan="3" class="value"><& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $ARGS{Requestors} || $session{CurrentUser}->EmailAddress, AutocompleteMultiple => 1 &></td>
 -    <td colspan="3" class="value"><& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $args->{Requestors} || $session{CurrentUser}->EmailAddress &></td>
++    <td colspan="3" class="value"><& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $args->{Requestors} || $session{CurrentUser}->EmailAddress, AutocompleteMultiple => 1 &></td>
  </tr>
  <tr class="input-row">
  <td class="labeltop"><&|/l&>Content</&>:</td>
diff --cc share/html/Elements/TSVExport
index cf037e1,0000000..ae59455
mode 100644,000000..100644
--- a/share/html/Elements/TSVExport
+++ b/share/html/Elements/TSVExport
@@@ -1,128 -1,0 +1,130 @@@
 +%# BEGIN BPS TAGGED BLOCK {{{
 +%#
 +%# COPYRIGHT:
 +%#
 +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 +%#                                          <sales 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 }}}
 +<%ARGS>
 +$Class => undef
 +$Collection
 +$Format
 +$PreserveNewLines => 0
 +</%ARGS>
 +<%ONCE>
 +my $no_html = HTML::Scrubber->new( deny => '*' );
 +</%ONCE>
 +<%INIT>
 +require HTML::Entities;
 +$Class ||= $Collection->ColumnMapClassName;
 +
 +$r->content_type('application/vnd.ms-excel');
 +
 +my $DisplayFormat = $m->comp('/Elements/ScrubHTML', Content => $Format);
 +
 +my @Format = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $DisplayFormat);
 +
 +my @columns;
 +
 +my $should_loc = { map { $_ => 1 } qw(Status) };
 +
 +my $col_entry = sub {
 +    my $col = shift;
 +    # in tsv output, "#" is often a comment character but we use it for "id"
 +    delete $col->{title}
 +        if $col->{title} and $col->{title} =~ /^\s*#\s*$/;
 +    return {
 +        header => loc($col->{title} || $col->{attribute}),
 +        map    => $m->comp(
 +            "/Elements/ColumnMap",
 +            Name  => $col->{attribute},
 +            Attr  => 'value',
 +            Class => $Class,
 +        ),
 +        should_loc => $should_loc->{$col->{attribute}},
 +    }
 +};
 +
 +if ($PreserveNewLines) {
 +    my $col = [];
 +    push @columns, $col;
 +    for (@Format) {
 +        if ($_->{title} eq 'NEWLINE') {
 +            $col = [];
 +            push @columns, $col;
 +        }
 +        else {
 +            push @$col, $col_entry->($_);
 +        }
 +    }
 +}
 +else {
 +    push @columns, [map { $_->{attribute}
 +                          ? $col_entry->($_)
 +                          : () } @Format];
 +}
 +
 +for (@columns) {
 +    $m->out(join("\t", map { $_->{header} } @$_)."\n");
 +}
 +
++my $i = 0;
 +my $ii = 0;
 +while (my $row = $Collection->Next) {
 +    for my $col (@columns) {
 +        $m->out(join("\t", map {
 +            my $val = ProcessColumnMapValue($_->{map}, Arguments => [$row, $ii++], Escape => 0);
 +            $val = loc($val) if $_->{should_loc};
 +            # remove tabs from all field values, they screw up the tsv
 +            $val = '' unless defined $val;
 +            $val =~ s/(?:\n|\r)+/ /g; $val =~ s{\t}{    }g;
 +            $val = $no_html->scrub($val);
 +            $val = HTML::Entities::decode_entities($val);
 +            $val;
 +        } @$col)."\n");
 +    }
++    $m->flush_buffer unless ++$i % 10;
 +}
 +$m->abort();
 +
 +</%INIT>
diff --cc share/html/Ticket/Create.html
index 4639c1d,c65ec94..1bfb58a
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@@ -53,8 -53,8 +53,9 @@@
  <& /Elements/ListActions, actions => \@results &>
  
  <form action="<% RT->Config->Get('WebPath') %>/Ticket/Create.html" method="post" enctype="multipart/form-data" name="TicketCreate">
+   <input type="submit" name="SubmitTicket" value="Create" style="display:none">
    <input type="hidden" class="hidden" name="id" value="new" />
 +  <input type="hidden" class="hidden" name="Token" value="<% $ARGS{'Token'} %>" />
    
  % $m->callback( CallbackName => 'FormStart', QueueObj => $QueueObj, ARGSRef => \%ARGS );
  
diff --cc share/html/Ticket/ModifyAll.html
index 5fb4a5b,af4756e..fcf449e
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@@ -53,12 -53,12 +53,13 @@@
  
  <form method="post" action="ModifyAll.html" name="TicketModifyAll" enctype="multipart/form-data">
  % $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
+ <input type="submit" name="SubmitTicket" value="Save Changes" style="display:none">
  <input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
 +<input type="hidden" class="hidden" name="Token" value="<% $ARGS{'Token'} %>" />
  
  <&| /Widgets/TitleBox, title => loc('Modify ticket # [_1]', $Ticket->Id), class=>'ticket-info-basics' &>
 -<& Elements/EditBasics, TicketObj => $Ticket &>
 -<& Elements/EditCustomFields, TicketObj => $Ticket &>
 +<& Elements/EditBasics, TicketObj => $Ticket, defaults => \%ARGS &>
 +<& /Elements/EditCustomFields, Object => $Ticket, Grouping => 'Basics' &>
  </&>
  
  % $m->callback(CallbackName => 'AfterBasics', Ticket => $Ticket);
diff --cc share/html/Ticket/ModifyPeople.html
index 46791ba,93f616a..f216ec8
--- a/share/html/Ticket/ModifyPeople.html
+++ b/share/html/Ticket/ModifyPeople.html
@@@ -51,7 -51,8 +51,8 @@@
  % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
  <& /Elements/ListActions, actions => \@results &>
  
 -<form method="post" action="ModifyPeople.html">
 +<form method="post" action="ModifyPeople.html" name="TicketPeople">
+ <input type="submit" name="SubmitTicket" value="Save Changes" style="display:none">
  <input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
  % $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
  <&| /Widgets/TitleBox, title => loc('Modify people related to ticket #[_1]', $Ticket->Id),   width => "100%", color=> "#333399", class=>'ticket-info-people' &>
diff --cc share/html/User/Prefs.html
index df5b297,e374e63..3ae793e
--- a/share/html/User/Prefs.html
+++ b/share/html/User/Prefs.html
@@@ -160,15 -154,24 +160,17 @@@
  </table>
  </&>
  
 -<&| /Widgets/TitleBox, title => loc('Custom Fields') &>
 -<table>
 -% my $CustomFields = $UserObj->CustomFields;
 -% while ( my $CF = $CustomFields->Next ) {
 -<tr valign="top">
 -<td align="right"><% loc( $CF->Name ) %>:</td>
 -<td><& /Elements/EditCustomField,
 -    %ARGS, Object => $UserObj, CustomField => $CF
 -&></td></tr>
 -% }
 -</table>
 -</&>
 +
 +
 +<& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &>
 +
 +
  
+ <& /Elements/Submit, Label => loc('Save Preferences') &>
+ 
  <&| /Widgets/TitleBox, title => loc('Secret authentication token'), id => "user-prefs-feeds" &>
  
 -<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</&>
 +<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL for one of your iCal feeds was exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b>, below.</&>
  
  <a href="#" id="ResetAuthTokenPrompt" style="display: none">
    <&|/l&>I want to reset my secret token.</&>
diff --cc share/html/index.html
index a307814,ae15c91..58274db
--- a/share/html/index.html
+++ b/share/html/index.html
@@@ -115,33 -115,25 +116,39 @@@ if ( $ARGS{'QuickCreate'} ) 
                          Subject => $ARGS{'Subject'});
          push @results, $msg;
  
-         if ( $t && $t->Id && RT->Config->Get('DisplayTicketAfterQuickCreate', $session{'CurrentUser'}) ) {
-             MaybeRedirectForResults(
-                 Actions   => \@results,
-                 Path      => '/Ticket/Display.html',
-                 Arguments => { id => $t->Id },
-             );
+         if ( $t && $t->Id ) {
+             $created = 1;
+             if ( RT->Config->Get('DisplayTicketAfterQuickCreate', $session{'CurrentUser'}) ) {
+                 MaybeRedirectForResults(
+                     Actions   => \@results,
+                     Path      => '/Ticket/Display.html',
+                     Arguments => { id => $t->Id },
+                 );
+             }
          }
 -
      }
      elsif ( !$ValidCFs ) {
 -        push @results, "can't quickly create ticket in queue " .
 -            $QueueObj->Name . ' because some custom fields need to be set, please go to normal ticket creation page to do that.';
 +        push @results, loc("Can't quickly create ticket in queue [_1] because custom fields are required.  Please finish by using the normal ticket creation page.", $QueueObj->Name);
 +        push @results, @msg;
 +
 +        MaybeRedirectForResults(
 +            Actions     => \@results,
 +            Path        => "/Ticket/Create.html",
 +            Arguments   => {
 +                (map { $_ => $ARGS{$_} } qw(Queue Owner Status Content Subject)),
 +                Requestors => $ARGS{Requestors},
 +                # From is set above when CFs are OK, but not here since we're
 +                # not calling CreateTicket() directly.  The proper place to set
 +                # a default for From, if desired in the future, is in
 +                # CreateTicket() itself, or at least /Ticket/Display.html
 +                # (which processes /Ticket/Create.html).  From is rarely used
 +                # overall.
 +            },
 +        );
      }
+ 
+     $session{QuickCreate} = \%ARGS unless $created;
+ 
      MaybeRedirectForResults(
          Actions   => \@results,
          Path      => '/',

-----------------------------------------------------------------------


More information about the rt-commit mailing list