[freeside-commits] freeside/rt/share/html/Ticket Display.html, 1.5, 1.6 Modify.html, 1.1.1.2, 1.2 ModifyAll.html, 1.1.1.3, 1.2
Mark Wells
mark at wavetail.420.am
Tue May 31 16:30:15 PDT 2011
Update of /home/cvs/cvsroot/freeside/rt/share/html/Ticket
In directory wavetail.420.am:/tmp/cvs-serv19783/share/html/Ticket
Modified Files:
Display.html Modify.html ModifyAll.html
Log Message:
improve mandatory fields, #9260
Index: ModifyAll.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/ModifyAll.html,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -u -w -d -r1.1.1.3 -r1.2
--- ModifyAll.html 17 Feb 2011 00:25:02 -0000 1.1.1.3
+++ ModifyAll.html 31 May 2011 23:30:13 -0000 1.2
@@ -236,6 +236,7 @@
push @results, ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS );
push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
}
+ push @results, ProcessTicketStatus( TicketObj => $Ticket, ARGSRef => \%ARGS );
$Ticket->ApplyTransactionBatch;
Index: Display.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Display.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- Display.html 20 Apr 2011 01:22:20 -0000 1.5
+++ Display.html 31 May 2011 23:30:13 -0000 1.6
@@ -164,9 +164,12 @@
push @Actions, ProcessTicketLinks( ARGSRef => \%ARGS, TicketObj => $TicketObj );
push @Actions, ProcessTicketDates( ARGSRef => \%ARGS, TicketObj => $TicketObj );
push @Actions, ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS, TicketObj => $TicketObj );
+ # If this fails due to required fields being empty, it will set
+ # notes('RedirectToBasics').
+ push @Actions, ProcessTicketStatus( ARGSRef => \%ARGS, TicketObj => $TicketObj );
- # XXX: we shouldn't block actions here if user has no right to see the ticket,
- # but we should allow him to see actions he has done
+ # XXX: we shouldn't block actions here if user has no right to see the
+ # ticket, but we should allow him to see actions he has done
unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
Abort("No permission to view ticket");
}
@@ -197,7 +200,14 @@
my $key = Digest::MD5::md5_hex( rand(1024) );
push @{ $session{"Actions"}->{$key} ||= [] }, @Actions;
$session{'i'}++;
- my $url = RT->Config->Get('WebURL') . "Ticket/Display.html?id=" . $TicketObj->id . "&results=" . $key;
+ my $url = RT->Config->Get('WebURL');
+ if ( $m->notes('RedirectToBasics') ) {
+ $url .= 'Ticket/Modify.html';
+ }
+ else {
+ $url .= 'Ticket/Display.html';
+ }
+ $url .= '?id=' . $TicketObj->id . "&results=" . $key;
$url .= '#' . $ARGS{Anchor} if $ARGS{Anchor};
RT::Interface::Web::Redirect($url);
}
Index: Modify.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Modify.html,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -w -d -r1.1.1.2 -r1.2
--- Modify.html 17 Feb 2011 00:25:02 -0000 1.1.1.2
+++ Modify.html 31 May 2011 23:30:13 -0000 1.2
@@ -79,8 +79,10 @@
# Now let callbacks have a chance at editing %ARGS
$m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS );
-my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
+my @results;
+push @results, ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
push @results, ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
+push @results, ProcessTicketStatus(TicketObj => $TicketObj, ARGSRef => \%ARGS);
$TicketObj->ApplyTransactionBatch;
More information about the freeside-commits
mailing list