[Rt-commit] rt branch, 4.2/pseudo-from-ticket-creation, created. rt-4.2.9-77-g46f7f78
Wallace Reis
wreis at bestpractical.com
Mon Jan 26 18:00:04 EST 2015
The branch, 4.2/pseudo-from-ticket-creation has been created
at 46f7f7866450f7c0e95d256a8c849ae9b987e594 (commit)
- Log -----------------------------------------------------------------
commit e63a1f6f92a079a32f909ff8b228e94da39edff1
Author: Wallace Reis <wreis at bestpractical.com>
Date: Mon Jan 26 20:56:19 2015 -0200
Lexically cache current user in Ticket/Create.html
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index 4639c1d..dcbc0fb 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -299,6 +299,8 @@ $m->callback( CallbackName => "Init", ARGSRef => \%ARGS );
my $Queue = $ARGS{Queue};
$session{DefaultQueue} = $Queue;
+my $current_user = $session{'CurrentUser'};
+
if ($CloneTicket) {
my $CloneTicketObj = RT::Ticket->new( $session{CurrentUser} );
$CloneTicketObj->Load($CloneTicket)
@@ -374,7 +376,7 @@ my @results;
my $title = loc("Create a new ticket");
-my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($current_user);
$QueueObj->Load($Queue) || Abort(loc("Queue [_1] could not be loaded.", $Queue||''));
$m->callback( QueueObj => $QueueObj, title => \$title, results => \@results, ARGSRef => \%ARGS );
@@ -383,7 +385,7 @@ $m->scomp( '/Articles/Elements/SubjectOverride', ARGSRef => \%ARGS, QueueObj =>
$QueueObj->Disabled && Abort(loc("Cannot create tickets in a disabled queue."));
-my $ticket = RT::Ticket->new($session{'CurrentUser'}); # empty ticket object
+my $ticket = RT::Ticket->new($current_user); # empty ticket object
ProcessAttachments(ARGSRef => \%ARGS);
commit 46f7f7866450f7c0e95d256a8c849ae9b987e594
Author: Wallace Reis <wreis at bestpractical.com>
Date: Mon Jan 26 20:56:33 2015 -0200
"From:" consistency on ticket creation
RT mocks a MIME object using ticket metadata during creation through web
UI which doesn't bother to include the basic email headers -- except for
quick ticket creation form. Hence set it at the full create page for
consistency's sakes.
Fixes: #30602
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index dcbc0fb..be846c4 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -435,6 +435,8 @@ if ( !exists $ARGS{'AddMoreAttach'} && ($ARGS{'id'}||'') eq 'new' ) {
}
}
+$ARGS{'From'} = $current_user->EmailAddress;
+
my $skip_create = 0;
$m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => \$skip_create,
checks_failure => $checks_failure, results => \@results );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list