[freeside-commits] freeside/rt/share/html/Ticket Create.html, 1.1.1.2.4.4, 1.1.1.2.4.5 Display.html, 1.2.4.1, 1.2.4.2
Mark Wells
mark at wavetail.420.am
Tue Apr 19 18:22:13 PDT 2011
- Previous message: [freeside-commits] freeside/FS/FS msa_Data.pm, NONE, 1.1.2.2 lata_Data.pm, NONE, 1.1.2.2 lata.pm, 1.1.2.2, 1.1.2.3 msa.pm, 1.1.2.2, 1.1.2.3 phone_avail.pm, 1.4.8.9, 1.4.8.10 Schema.pm, 1.239.2.31, 1.239.2.32 Setup.pm, 1.22, 1.22.4.1 Upgrade.pm, 1.45.2.2, 1.45.2.3
- Next message: [freeside-commits] freeside/rt/share/html/Ticket Create.html, 1.5, 1.6 Display.html, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/rt/share/html/Ticket
In directory wavetail.420.am:/tmp/cvs-serv2755/share/html/Ticket
Modified Files:
Tag: FREESIDE_2_1_BRANCH
Create.html Display.html
Log Message:
cloned tickets inherit customer links, #11169
Index: Create.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Create.html,v
retrieving revision 1.1.1.2.4.4
retrieving revision 1.1.1.2.4.5
diff -u -w -d -r1.1.1.2.4.4 -r1.1.1.2.4.5
--- Create.html 8 Apr 2011 23:13:52 -0000 1.1.1.2.4.4
+++ Create.html 20 Apr 2011 01:22:11 -0000 1.1.1.2.4.5
@@ -240,6 +240,7 @@
<tr><td class="label"><&|/l&>Children</&></td><td><input size="10" name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} || '' %>" /></td></tr>
<tr><td class="label"><&|/l&>Refers to</&></td><td><input size="10" name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} || '' %>" /></td></tr>
<tr><td class="label"><&|/l&>Referred to by</&></td><td><input size="10" name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} || '' %>" /></td></tr>
+<tr><td class="label">Customer ID</td><td><input size="10" name="new-Customer" value="<% $ARGS{'new-Customer'} || '' %>" /></td></tr>
</table>
@@ -330,6 +331,16 @@
@cf_values;
}
+ # Pass customer links along (even though cloning of parent links
+ # in general is disabled).
+ my $customers = $CloneTicketObj->Customers;
+ my @customers;
+ while ( my $customer = $customers->Next ) {
+ my ($custnum) = $customer->Target =~ /cust_main\/(\d+)$/;
+ push @customers, $custnum if $custnum;
+ }
+ $clone->{'new-Customer'} = join(' ', @customers);
+
for ( keys %$clone ) {
$ARGS{$_} = $clone->{$_} if not defined $ARGS{$_};
}
@@ -423,7 +434,18 @@
if ((!exists $ARGS{'AddMoreAttach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} eq 'new')) { # new ticket?
if ( $ValidCFs && !$checks_failure && !$skip_create ) {
+# CREATE THE TICKET.
+# For some reason it's done by a Mason component named "Display.html"
+# and the call is buried in obscure error-handling stuff.
+# This comment exists to make it more visually obvious.
+# ************************************************************
+
$m->comp('Display.html', %ARGS);
+
+# ************************************************************
+# Execution should not continue here. Display.html calls
+# Redirect() which does an $m->abort. We only get here if the
+# code dies before then, hence "$@".
$RT::Logger->crit("After display call; error is $@");
$m->abort();
}
Index: Display.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Display.html,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.2
diff -u -w -d -r1.2.4.1 -r1.2.4.2
--- Display.html 8 Apr 2011 23:13:52 -0000 1.2.4.1
+++ Display.html 20 Apr 2011 01:22:11 -0000 1.2.4.2
@@ -104,6 +104,14 @@
if ($ARGS{'id'} eq 'new') {
# {{{ Create a new ticket
+ # Massage customer IDs into member links.
+ my @cust_uris = map {
+ /^(\d+)$/ && "freeside://freeside/cust_main/$1"
+ } split(' ', $ARGS{'new-Customer'});
+
+ $ARGS{'new-MemberOf'} =
+ join(' ', $ARGS{'new-MemberOf'}, @cust_uris);
+
my $Queue = new RT::Queue( $session{'CurrentUser'} );
$Queue->Load($ARGS{'Queue'});
unless ( $Queue->id ) {
- Previous message: [freeside-commits] freeside/FS/FS msa_Data.pm, NONE, 1.1.2.2 lata_Data.pm, NONE, 1.1.2.2 lata.pm, 1.1.2.2, 1.1.2.3 msa.pm, 1.1.2.2, 1.1.2.3 phone_avail.pm, 1.4.8.9, 1.4.8.10 Schema.pm, 1.239.2.31, 1.239.2.32 Setup.pm, 1.22, 1.22.4.1 Upgrade.pm, 1.45.2.2, 1.45.2.3
- Next message: [freeside-commits] freeside/rt/share/html/Ticket Create.html, 1.5, 1.6 Display.html, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list