diff options
Diffstat (limited to 'rt/share/html/Ticket')
| -rw-r--r-- | rt/share/html/Ticket/Checklist.html | 30 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Create.html | 32 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Display.html | 30 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/AddCustomers | 55 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Elements/BulkLinks | 2 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Elements/EditCustomFields | 7 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/EditCustomers | 63 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/EditTransactionCustomFields | 13 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/ShowCustomers | 38 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/ShowMembers_Checklist | 29 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/ShowParents | 1 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Elements/ShowSummary | 7 | ||||
| -rw-r--r-- | rt/share/html/Ticket/Elements/ShowTransactionAttachments | 10 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Elements/Tabs | 17 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Modify.html | 4 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/ModifyAll.html | 1 | ||||
| -rw-r--r-- | rt/share/html/Ticket/ModifyCustomers.html | 49 | ||||
| -rwxr-xr-x | rt/share/html/Ticket/Update.html | 20 |
18 files changed, 387 insertions, 21 deletions
diff --git a/rt/share/html/Ticket/Checklist.html b/rt/share/html/Ticket/Checklist.html new file mode 100644 index 000000000..7394b0c10 --- /dev/null +++ b/rt/share/html/Ticket/Checklist.html @@ -0,0 +1,30 @@ +<& /Elements/Header, Title => loc("Checklist for Ticket #[_1] [_2]", $Ticket->Id, $Ticket->Subject) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, current_tab => 'Ticket/Checklist.html?id='.$Ticket->id, + Title => loc("Ticket Checklist # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &> + +<& /Ticket/Elements/ShowMembers_Checklist, Ticket => $Ticket &> + +% if ( $show_hint ) { + +<A HREF="ModifyLinks.html?id=<%$Ticket->id%>">Link</A> +or <A HREF="Create.html?Queue=<%$Ticket->QueueObj->Id%>&new-MemberOf=<%$Ticket->id%>">create</A> +create child tickets to make a checklist. + +% } + +<%ARGS> +$id => undef +</%ARGS> + +<%INIT> + +my $Ticket = LoadTicket ($id); + +unless ($Ticket->CurrentUserHasRight('ShowTicket')) { + Abort("No permission to view ticket"); +} + +my $show_hint = ! $Ticket->Members->Count; + +</%INIT> diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index 651c61041..6ea2c9f39 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -64,8 +64,14 @@ <&| /Widgets/TitleBox, title => $title &> <table border="0" cellpadding="0" cellspacing="0"> <tr><td class="label"><&|/l&>Queue</&>:</td> -<td class="value"><& Elements/ShowQueue, QueueObj => $QueueObj &> -<input type="hidden" class="hidden" name="Queue" value="<% $QueueObj->Name %>" /> +%#<td class="value"><& Elements/ShowQueue, QueueObj => $QueueObj &> +%#<input type="hidden" class="hidden" name="Queue" value="<% $QueueObj->Name %>" /> +<td class="value"><& /Elements/SelectQueue, + Name => 'Queue', + Default => $QueueObj->Name, + ShowNullOption => 0, + ShowAllQueues => 0, + OnChange => "document.getElementsByName('id')[0].value = ''; form.submit()" &> </td> <td class="label"><&|/l&>Status</&>: </td> @@ -234,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> @@ -324,6 +331,16 @@ if ($CloneTicket) { @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{$_}; } @@ -417,7 +434,18 @@ $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => 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(); } diff --git a/rt/share/html/Ticket/Display.html b/rt/share/html/Ticket/Display.html index 21be7953a..59adbd68d 100755 --- a/rt/share/html/Ticket/Display.html +++ b/rt/share/html/Ticket/Display.html @@ -46,12 +46,12 @@ %# %# END BPS TAGGED BLOCK }}} <& /Elements/Header, - Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject), + Title => loc("Ticket #[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject), LinkRel => \%link_rel &> <& /Ticket/Elements/Tabs, Ticket => $TicketObj, current_tab => 'Ticket/Display.html?id='.$TicketObj->id, - Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> + Title => loc("Ticket #[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> % $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@Actions, ARGSRef => \%ARGS, Ticket => $TicketObj); @@ -104,6 +104,14 @@ unless ($id || $TicketObj) { 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 ) { @@ -155,10 +163,13 @@ if ($ARGS{'id'} eq 'new') { push @Actions, ProcessTicketBasics( ARGSRef => \%ARGS, TicketObj => $TicketObj ); push @Actions, ProcessTicketLinks( ARGSRef => \%ARGS, TicketObj => $TicketObj ); push @Actions, ProcessTicketDates( ARGSRef => \%ARGS, TicketObj => $TicketObj ); - push @Actions, ProcessObjectCustomFieldUpdates(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"); } @@ -189,7 +200,14 @@ if (@Actions) { 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); } diff --git a/rt/share/html/Ticket/Elements/AddCustomers b/rt/share/html/Ticket/Elements/AddCustomers new file mode 100644 index 000000000..09acdfd3f --- /dev/null +++ b/rt/share/html/Ticket/Elements/AddCustomers @@ -0,0 +1,55 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# Copyright (c) 2008 Freeside Internet Services, Inc. +%# +%# 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. +<BR> +<%$msg%><br> + +% if (@Customers) { + +<br><i>(Check box to link)<i> +<table> +% foreach my $customer (@Customers) { +<tr> + <td> + <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>> + <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %> + </td> +</tr> +% } +</table> + +% } + +<%INIT> +my ($msg); + +my $freeside_url = &RT::URI::freeside::FreesideURL(); + +my @Customers = (); +if ( $CustomerString ) { + @Customers = &RT::URI::freeside::smart_search( + 'search' => $CustomerString, + 'no_fuzzy_on_exact' => 1, #pref? + ); +} + +my @Services = (); +if ($ServiceString) { + @Services = (); #service_search(); +} + +</%INIT> + +<%ARGS> +$CustomerString => undef +$ServiceString => undef +</%ARGS> diff --git a/rt/share/html/Ticket/Elements/BulkLinks b/rt/share/html/Ticket/Elements/BulkLinks index b97270e43..181fbed56 100755 --- a/rt/share/html/Ticket/Elements/BulkLinks +++ b/rt/share/html/Ticket/Elements/BulkLinks @@ -163,7 +163,7 @@ $Tickets => undef <%INIT> my %hash; if ( $Tickets && $Tickets->Count ) { - my $first_ticket = $Tickets->Next; + my $first_ticket = $Tickets->Next or last; #avoid errors on bulk delete # we only show current links that eixst on all the tickets for my $type ( qw/DependsOn DependedOnBy Members MemberOf RefersTo ReferredToBy/ ) { diff --git a/rt/share/html/Ticket/Elements/EditCustomFields b/rt/share/html/Ticket/Elements/EditCustomFields index 918f4d4f5..ee55e996f 100755 --- a/rt/share/html/Ticket/Elements/EditCustomFields +++ b/rt/share/html/Ticket/Elements/EditCustomFields @@ -105,6 +105,13 @@ $m->callback( %ARGS, CallbackName => 'MassageCustomFields', CustomFields => $Cus my $single_column = RT->Config->Get('EditCustomFieldsSingleColumn'); +# show hints for missing required fields +if ( $TicketObj ) { + foreach my $field ( $TicketObj->MissingRequiredFields ) { + $m->notes('InvalidField-' . $field->Id => 'Required to resolve'); + } +} + </%INIT> <%ARGS> $NamePrefix => '' diff --git a/rt/share/html/Ticket/Elements/EditCustomers b/rt/share/html/Ticket/Elements/EditCustomers new file mode 100644 index 000000000..0ba6e447b --- /dev/null +++ b/rt/share/html/Ticket/Elements/EditCustomers @@ -0,0 +1,63 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# Copyright (c) 2008 Freeside Internet Services, Inc. +%# +%# 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. +<TABLE width=100%> + <TR> + <TD VALIGN=TOP WIDTH=50%> + <h3><&|/l&>Current Customers</&></h3> + +<table> + <tr> + <td><i><&|/l&>(Check box to disassociate)</&></i></td> + </tr> + <tr> + <td class="value"> +% foreach my $link ( @{ $Ticket->Customers->ItemsArrayRef } ) { + + <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>"> +%# <& ShowLink, URI => $link->TargetURI &><br> + <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %></A> + <BR> +% } + </td> + </tr> +</table> + +</TD> + +<TD VALIGN=TOP> +<h3><&|/l&>New Customer Links</&></h3> +<&|/l&>Find customer</&><BR> +<input name="CustomerString"> +<input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>"> +<br><i>cust #, name, company or phone</i> +<BR> +%#<BR> +%#<&|/l&>Find service</&><BR> +%#<input name="ServiceString"> +%#<input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>"> +%#<br><i>username, username@domain, domain, or IP address</i> +%#<BR> + +<& AddCustomers, Ticket => $Ticket, + CustomerString => $CustomerString, + ServiceString => $ServiceString, &> + +</TD> +</TR> +</TABLE> + +<%ARGS> +$CustomerString => undef +$ServiceString => undef +$Ticket => undef +</%ARGS> diff --git a/rt/share/html/Ticket/Elements/EditTransactionCustomFields b/rt/share/html/Ticket/Elements/EditTransactionCustomFields index e2f42b2c5..a4ade8721 100644 --- a/rt/share/html/Ticket/Elements/EditTransactionCustomFields +++ b/rt/share/html/Ticket/Elements/EditTransactionCustomFields @@ -48,19 +48,25 @@ % $m->callback( CallbackName => 'BeforeTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix ); % if ($CustomFields->Count) { % while (my $CF = $CustomFields->Next()) { +% $CF->SetContextObject($TicketObj || $QueueObj); % next unless $CF->CurrentUserHasRight('ModifyCustomField'); +% next unless $CF->UILocation eq $UILocation; <tr> -<td class="label"><% loc($CF->Name) %>:</td> +<td class="label"> +<% loc($CF->Name) %>: +</td> <td> <& /Elements/EditCustomField, CustomField => $CF, NamePrefix => $NamePrefix &> +% if ( $CF->Type ne 'TimeValue' ) { <em><% $CF->FriendlyType %></em> -% if (my $msg = $m->notes('InvalidField-' . $CF->Id)) { +% } +% if (my $msg = $m->notes('InvalidField-' . $CF->Id)) { <br /> <span class="cfinvalidfield"><% $msg %></span> -% } +% } </td> </td></tr> % } @@ -83,5 +89,6 @@ $m->callback( CallbackName => 'MassageTransactionCustomFields', CustomFields => $NamePrefix => "Object-RT::Transaction--CustomField-" $TicketObj => undef $QueueObj => undef +$UILocation => '' </%ARGS> diff --git a/rt/share/html/Ticket/Elements/ShowCustomers b/rt/share/html/Ticket/Elements/ShowCustomers new file mode 100644 index 000000000..3acf92dd4 --- /dev/null +++ b/rt/share/html/Ticket/Elements/ShowCustomers @@ -0,0 +1,38 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# +%# 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. +<table> +% my $cust = 0; +% foreach my $custResolver ( map { $_->TargetURI->Resolver } +% @{ $Ticket->Customers->ItemsArrayRef } +% ) +% { +% $cust++; +% my $cust_main = ''; + <tr> + <td class="value"> + <A HREF="<% $custResolver->HREF %>"><% $custResolver->AsStringLong |n %></A> + </td> + </tr> +% } +% unless ( $cust ) { + <tr> + <td class="labeltop"> + <i>(none)<i> + </td> + </tr> + +% } +</table> +<%ARGS> +$Ticket => undef +</%ARGS> + diff --git a/rt/share/html/Ticket/Elements/ShowMembers_Checklist b/rt/share/html/Ticket/Elements/ShowMembers_Checklist new file mode 100644 index 000000000..68fb3b2c5 --- /dev/null +++ b/rt/share/html/Ticket/Elements/ShowMembers_Checklist @@ -0,0 +1,29 @@ + +<style type="text/css"> +ul.checklist { + list-style-type: none +} +</style> + +<ul class="checklist"> +% while (my $link = $members->Next) { +<li><& /Elements/ShowLink_Checklist, URI => $link->BaseURI &><br /> +% if ($depth < 8) { #why only 8? +<& /Ticket/Elements/ShowMembers_Checklist, Ticket => $link->BaseObj, depth => ($depth+1) &> +% } +</li> +% } +</ul> + +<%INIT> + +return unless $Ticket; +my $members = $Ticket->Members; +return unless $members->Count; + +</%INIT> + +<%ARGS> +$Ticket => undef +$depth => 1 +</%ARGS> diff --git a/rt/share/html/Ticket/Elements/ShowParents b/rt/share/html/Ticket/Elements/ShowParents index d3371154a..74bd8e174 100644 --- a/rt/share/html/Ticket/Elements/ShowParents +++ b/rt/share/html/Ticket/Elements/ShowParents @@ -47,6 +47,7 @@ %# END BPS TAGGED BLOCK }}} <ul> % while (my $link = $member_of->Next) { +% next if $link->Target and $link->Target =~ m(^freeside://); <li><& /Elements/ShowLink, URI => $link->TargetURI &><br /> % } </ul> diff --git a/rt/share/html/Ticket/Elements/ShowSummary b/rt/share/html/Ticket/Elements/ShowSummary index 24d8c4dfe..ef5960e01 100755 --- a/rt/share/html/Ticket/Elements/ShowSummary +++ b/rt/share/html/Ticket/Elements/ShowSummary @@ -66,6 +66,13 @@ </&> % } + <&| /Widgets/TitleBox, title => loc('Customers'), + title_href => RT->Config->Get('WebPath')."/Ticket/ModifyCustomers.html?id=".$Ticket->Id, + class => 'ticket-info-customers' + &> + <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &> + </&> + <&| /Widgets/TitleBox, title => loc('People'), title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id, class => 'ticket-info-people', diff --git a/rt/share/html/Ticket/Elements/ShowTransactionAttachments b/rt/share/html/Ticket/Elements/ShowTransactionAttachments index 161a4853f..625e124f8 100644 --- a/rt/share/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/share/html/Ticket/Elements/ShowTransactionAttachments @@ -210,8 +210,14 @@ my $render_attachment = sub { # if it's a text/plain show the body elsif ( $message->ContentType =~ m{^(text|message)}i ) { - eval { require Text::Quoted; $content = Text::Quoted::extract($content); }; - if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) } + #don't want to use this even if it is installed, its + #segfaulting on weird characters and silently truncating the + #ticket history output + #see: + # r44838@pinglin: jesse | 2006-11-14 15:53:18 -0500 + # * Move Text::Quoted back to being a run-time require. So that it's possible to turn off the feature if it causes your perl to segfault. (Text::Tabs is...not robust in the face of perl bugs) + #eval { require Text::Quoted; $content = Text::Quoted::extract($content); }; + #if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) } $m->comp( 'ShowMessageStanza', diff --git a/rt/share/html/Ticket/Elements/Tabs b/rt/share/html/Ticket/Elements/Tabs index d88a2ad91..2f89dc61c 100755 --- a/rt/share/html/Ticket/Elements/Tabs +++ b/rt/share/html/Ticket/Elements/Tabs @@ -142,6 +142,14 @@ if ($Ticket) { title => loc('Links'), path => "Ticket/ModifyLinks.html?id=" . $id, }, + _Ea => { + title => loc('Checklist'), + path => "Ticket/Checklist.html?id=" . $id, + }, + _Eb=> { + title => loc('Customers'), + path => "Ticket/ModifyCustomers.html?id=" . $id, + }, _X => { title => loc('Jumbo'), path => "Ticket/ModifyAll.html?id=" . $id, @@ -188,7 +196,9 @@ if ($Ticket) { if ( $can{'ModifyTicket'} ) { if ( $Ticket->Status ne 'resolved' ) { $actions->{'G'} = { - path => + path => + ($Ticket->MissingRequiredFields) ? + "Ticket/Modify.html?Status=resolved&id=$id" : "Ticket/Update.html?Action=" . RT->Config->Get('ResolveDefaultUpdateType', $session{'CurrentUser'}) . "&DefaultStatus=resolved&id=" @@ -326,6 +336,11 @@ if ($has_query) { title => loc('Graph'), }; + $tabs->{"l"} = { + path => "Prefs/SavedSearches.html", + title => 'Saved Searches', + }; + } foreach my $searchtab ( keys %{$searchtabs} ) { diff --git a/rt/share/html/Ticket/Modify.html b/rt/share/html/Ticket/Modify.html index b80d86f68..9f1a95932 100755 --- a/rt/share/html/Ticket/Modify.html +++ b/rt/share/html/Ticket/Modify.html @@ -79,8 +79,10 @@ $m->comp( # 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; diff --git a/rt/share/html/Ticket/ModifyAll.html b/rt/share/html/Ticket/ModifyAll.html index 1776c40d8..cd9bb3891 100755 --- a/rt/share/html/Ticket/ModifyAll.html +++ b/rt/share/html/Ticket/ModifyAll.html @@ -236,6 +236,7 @@ unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} ) push @results, ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS ); push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); } + push @results, ProcessTicketStatus( TicketObj => $Ticket, ARGSRef => \%ARGS ); $Ticket->ApplyTransactionBatch; diff --git a/rt/share/html/Ticket/ModifyCustomers.html b/rt/share/html/Ticket/ModifyCustomers.html new file mode 100644 index 000000000..72d103b23 --- /dev/null +++ b/rt/share/html/Ticket/ModifyCustomers.html @@ -0,0 +1,49 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# +%# 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. +<& /Elements/Header, Title => loc("Customers for ticket #[_1]", $Ticket->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/ModifyCustomers.html?id=".$Ticket->Id, + Title => loc("Customers for ticket #[_1]", $Ticket->Id) &> + +<& /Elements/ListActions, actions => \@results &> + +<form action="ModifyCustomers.html" method="post"> +<input type="hidden" name="id" value="<%$Ticket->id%>"> + +<& /Elements/TitleBoxStart, title => loc('Edit Customer Links'), color => "#7f007b"&> +<& Elements/EditCustomers, Ticket => $Ticket, CustomerString => $CustomerString, ServiceString => $ServiceString &> +<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, color => "#7f007b", Label => loc('Save Changes') &> +</form> + + +<%INIT> + +my @results = (); +my $Ticket = LoadTicket($id); + +# if we're trying to search for customers/services and nothing else +unless ( $OnlySearchForCustomers || $OnlySearchForServices) { + @results = ProcessTicketCustomers( TicketObj => $Ticket, ARGSRef => \%ARGS); +} + +</%INIT> + + +<%ARGS> +$OnlySearchForCustomers => undef +$OnlySearchForServices => undef +$CustomerString => undef +$ServiceString => undef +$id => undef +</%ARGS> diff --git a/rt/share/html/Ticket/Update.html b/rt/share/html/Ticket/Update.html index 50c6f9327..62db0d1c3 100755 --- a/rt/share/html/Ticket/Update.html +++ b/rt/share/html/Ticket/Update.html @@ -65,8 +65,8 @@ <table width="100%" border="0"> % $m->callback(CallbackName => 'AfterTableOpens', ARGSRef => \%ARGS, Ticket => $TicketObj); -<tr><td class="label"><&|/l&>Status</&>:</td> -<td> +<tr><td valign="baseline" class="label"><&|/l&>Status</&>:</td> +<td valign="baseline"> <& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&> <span class="label"><&|/l&>Owner</&>:</span> <& /Elements/SelectOwner, @@ -76,13 +76,23 @@ DefaultLabel => loc("[_1] (Unchanged)", $m->scomp('/Elements/ShowUser', User => $TicketObj->OwnerObj)), Default => $ARGS{'Owner'} &> -<span class="label"><&|/l&>Worked</&>:</span> -<& /Elements/EditTimeValue, +</td> +<td rowspan=4 valign="top"> +<table style="float:right;"> +<tr> +<td class="label"><&|/l&>Worked</&>:</td> +<td><& /Elements/EditTimeValue, Name => 'UpdateTimeWorked', Default => $ARGS{UpdateTimeWorked}||'', InUnits => $ARGS{'UpdateTimeWorked-TimeUnits'}||'minutes', &> </td></tr> +<& /Ticket/Elements/EditTransactionCustomFields, + %ARGS, + TicketObj => $TicketObj, + UILocation => 'TimeWorked', +&> +</table></td></tr> % my $skip; % $m->callback( %ARGS, CallbackName => 'BeforeUpdateType', skip => \$skip ); % if (!$skip) { @@ -131,7 +141,7 @@ % } % $m->callback( %ARGS, CallbackName => 'AfterGnuPG' ); -<tr><td class="label" valign="top"><&|/l&>Message</&>:</td><td> +<tr><td class="label" valign="top"><&|/l&>Message</&>:</td><td colspan=2> % $m->callback( %ARGS, CallbackName => 'BeforeMessageBox' ); % if (exists $ARGS{UpdateContent}) { % # preserve QuoteTransaction so we can use it to set up sane references/in/reply to |
