From d4d0590bef31071e8809ec046717444b95b3f30a Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Oct 2005 09:11:20 +0000 Subject: import rt 3.4.4 --- rt/html/Search/Bulk.html | 75 +++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 49 deletions(-) (limited to 'rt/html/Search/Bulk.html') diff --git a/rt/html/Search/Bulk.html b/rt/html/Search/Bulk.html index f75934bf3..f9eef26b6 100644 --- a/rt/html/Search/Bulk.html +++ b/rt/html/Search/Bulk.html @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,13 +42,13 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/Header, Title => loc("Bulk ticket update") &> <& /Elements/Tabs, Title => loc("Bulk ticket update") &> <& /Elements/ListActions, actions => \@results &> - -
+ + @@ -75,8 +75,7 @@ while (my $Ticket = $Tickets->Next) { } - -%# The ticket view is controlled by config.pm, WebOptions + %foreach my $col (@cols) { +% while (my $CF = $TxnCFs->Next()) { + + + + +% } # end if while
<&|/l&>Update
% if ($col eq 'id') { @@ -153,44 +152,26 @@ while (my $Ticket = $Tickets->Next) {
<&|/l&>Subject:
<% $CF->Name %>:<& /Elements/EditCustomField, + CustomField => $CF, + NamePrefix => "Object-RT::Transaction--CustomField-" + &><% $CF->FriendlyType %>
<&|/l&>Attach:
<&|/l&>Message: <& /Elements/MessageBox, Name=>"UpdateContent"&>
- -% foreach (keys %allcfs) { - - - -% } -
-% my $cf = $allcfs{$_}; -% my $pref; -% if ($cf->Queue == 0) { -% $pref = "[Global]"; -% } else { -% $pref = "[Queue: " . $cfqnames{$_} . "]"; -% } -<%$pref%> <% $cf->Name %>
-<% $cf->FriendlyType %> -
-% if ($cf->Type ne "FreeformMultiple") { -<& /Ticket/Elements/EditCustomField, CustomField => $cf &> -% } else { -Add Values
- -
-Delete Values
- -% } -
- <& /Elements/TitleBoxEnd &> + <& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&> -<&|/l&>Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces.
+<&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.
<& /Ticket/Elements/BulkLinks &> <& /Elements/TitleBoxEnd &> @@ -223,7 +204,7 @@ while (my $Ticket = $Tickets->Next) { unless ( exists $cfqs{$cfqid} ) { $cfqs{$cfqid} = 1; $count++; - my $cfs = $cfq->CustomFields; + my $cfs = $cfq->TicketCustomFields; while (my $cf = $cfs->Next) { $allcfs{$cf->Id} = $cf; $cfqnames{$cf->Id} = $cfqn; @@ -245,9 +226,11 @@ if ($ARGS{'UpdateContent'} && #Iterate through each ticket we've been handed my @linkresults; +my %queues; $Tickets->RedoSearch(); while (my $Ticket = $Tickets->Next) { + $queues{$Ticket->QueueObj->Id}++; $RT::Logger->debug( "Checking Ticket ".$Ticket->Id ."\n"); next unless ($ARGS{"UpdateTicket".$Ticket->Id}); $RT::Logger->debug ("Matched\n"); @@ -262,16 +245,6 @@ while (my $Ticket = $Tickets->Next) { #Update the watchers my @watchresults = ProcessTicketWatchers(TicketObj => $Ticket, ARGSRef => \%ARGS); - #Update custom fields - my $pat = "^(\\d+)-(.*)\$"; - foreach (keys %ARGS) { - $ARGS{"Ticket-" . $Ticket->Id . "-CustomField-" . $1 . "-" . $2} = $ARGS{$_} if (/$pat/o); - } - my @cfresults = ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS); - foreach (keys %ARGS) { - delete $ARGS{"Ticket-" . $Ticket->Id . "-CustomField-" . $1 . "-" . $2} if (/$pat/o); - } - #Update the links $ARGS{'id'} = $Ticket; @@ -291,11 +264,15 @@ while (my $Ticket = $Tickets->Next) { delete $ARGS{'MemberOf-'.$Ticket->Id}; delete $ARGS{$Ticket->Id.'-RefersTo'}; delete $ARGS{'RefersTo-'.$Ticket->Id}; - - my @tempresults = (@watchresults, @basicresults, @dateresults, @updateresults, @linkresults, @cfresults); + my @tempresults = (@watchresults, @basicresults, @dateresults, + @updateresults, @linkresults); @tempresults = map { loc("Ticket [_1]: [_2]",$Ticket->Id,$_) } @tempresults; @results = (@results, @tempresults); } +my $TxnCFs = RT::CustomFields->new($session{CurrentUser}); +$TxnCFs->LimitToLookupType("RT::Queue-RT::Ticket-RT::Transaction"); +$TxnCFs->LimitToGlobalOrObjectId(sort keys %queues); + -- cgit v1.2.1