[freeside-commits] freeside/rt/share/html/Ticket Display.html, 1.2.4.2, 1.2.4.3 Modify.html, 1.1.1.1, 1.1.1.1.4.1 ModifyAll.html, 1.1.1.2, 1.1.1.2.4.1
Mark Wells
mark at wavetail.420.am
Tue May 31 16:12:40 PDT 2011
Update of /home/cvs/cvsroot/freeside/rt/share/html/Ticket
In directory wavetail.420.am:/tmp/cvs-serv17802/share/html/Ticket
Modified Files:
Tag: FREESIDE_2_1_BRANCH
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.2
retrieving revision 1.1.1.2.4.1
diff -u -w -d -r1.1.1.2 -r1.1.1.2.4.1
--- ModifyAll.html 18 May 2010 18:45:45 -0000 1.1.1.2
+++ ModifyAll.html 31 May 2011 23:12:38 -0000 1.1.1.2.4.1
@@ -232,6 +232,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.2.4.2
retrieving revision 1.2.4.3
diff -u -w -d -r1.2.4.2 -r1.2.4.3
--- Display.html 20 Apr 2011 01:22:11 -0000 1.2.4.2
+++ Display.html 31 May 2011 23:12:37 -0000 1.2.4.3
@@ -164,9 +164,12 @@
push @Actions, ProcessTicketLinks( ARGSRef => \%ARGS, TicketObj => $TicketObj );
push @Actions, ProcessTicketDates( ARGSRef => \%ARGS, TicketObj => $TicketObj );
push @Actions, ProcessObjectCustomFieldUpdates(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.1
retrieving revision 1.1.1.1.4.1
diff -u -w -d -r1.1.1.1 -r1.1.1.1.4.1
--- Modify.html 31 Dec 2009 13:16:26 -0000 1.1.1.1
+++ Modify.html 31 May 2011 23:12:38 -0000 1.1.1.1.4.1
@@ -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