Hello all,

Some time ago I asked about selecting a ticket within a bulk action,
to make sure our accounting reports are correct.  I hoped for an
answer, but maybe nobody knows the answer.

I browsed all database tables but could not find any way to select
the group of tickets that's closed as one bulk action, so I made a
patch to achieve what I want.

What I want is:
When more than one ticket is closed with a bulk action and time is
allotted to this ticket group, only one ticket should get the
accounted time. To make sure current installations don't break with
this patch I created an extra configuration option to achieve the
desired effect. So, all tickets get a time unit of 0.00 except the
first one. This one gets the time for the complete bulk action.

This very simple patch is:
(In the directory $OTRS/Kernel/Modules)


--- AgentTicketBulk.pm  2010-05-27 12:57:54.000000000 +0200
+++ AgentTicketBulk.pm.org      2009-08-25 16:32:55.000000000 +0200
@@ -72,9 +72,6 @@
     my $Output = $Self->{LayoutObject}->Header();
 
     # process tickets
-    my $FirstTicket  = 1;
-    my $CountOneTime = $Self->{'Ticket::Frontend::BulkFeatureCountOne'};
-
     for my $TicketID (@TicketIDs) {
         my %Ticket = $Self->{TicketObject}->TicketGet( TicketID => $TicketID );
 
@@ -243,9 +240,6 @@
             # time units
             my $TimeUnits = $Self->{ParamObject}->GetParam( Param => 
'TimeUnits' );
             if ($TimeUnits) {
-                if ( ($CountOneTime == 1) && ($FirstTicket == 0) ) {
-                    $TimeUnits = '0.00';
-                }
                 $Self->{TicketObject}->TicketAccountTime(
                     TicketID  => $TicketID,
                     ArticleID => $ArticleID,
@@ -253,7 +247,6 @@
                     UserID    => $Self->{UserID},
                 );
             }
-            $FirstTicket = 0;

             # merge to
             my $MergeToSelection = $Self->{ParamObject}->GetParam(


And the configuration option 
        $Self->{'Ticket::Frontend::BulkFeatureCountOne'} = 1;
should be defined in Config.pm

Maybe a good idea for a next version.

Cheers,
        TonK
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Reply via email to