<commit_before># --
# Kernel/Output/HTML/DashboardCalendar.pm
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: DashboardCalendar.pm,v 1.2 2009-06-05 22:12:42 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

package Kernel::Output::HTML::DashboardCalendar;

use strict;
use warnings;

use vars qw($VERSION);
$VERSION = qw($Revision: 1.2 $) [1];

sub new {
    my ( $Type, %Param ) = @_;

    # allocate new hash for object
    my $Self = {%Param};
    bless( $Self, $Type );

    # get needed objects
    for (qw(Config Name ConfigObject LogObject DBObject LayoutObject ParamObject TicketObject UserID)) {
        die "Got no $_!" if ( !$Self->{$_} );
    }

    return $Self;
}

sub Run {
    my ( $Self, %Param ) = @_;

    my %Map = (
        Escalation => [ 'TicketEscalation', 'Escalation', ],
        Pending    => [ 'TicketPending', 'Reminder Reached', ],
    );

    my %Date;

    for my $Type ( sort keys %Map ) {

        my @TicketIDs = $Self->{TicketObject}->TicketSearch(

            # ticket escalations over 60 minutes (optional)
#            $Map{ $Type }->[0] . 'TimeOlderMinutes' => -30,
            # ticket escalations in 120 minutes (optional)
            $Map{ $Type }->[0] . 'TimeNewerMinutes' => ( 60 * 6 ),

            Result     => 'ARRAY',
            Permission => $Self->{Config}->{Permission} || 'ro',
            UserID     => $Self->{UserID},
            Limit      => 20,
        );
        for my $TicketID (@TicketIDs) {

            my %Ticket = $Self->{TicketObject}->TicketGet(
                TicketID => $TicketID,
                UserID   => $Self->{UserID},
            );<commit_msg>Changed max preview time of shown tickets.<commit_after># --
# Kernel/Output/HTML/DashboardCalendar.pm
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: DashboardCalendar.pm,v 1.3 2009-06-06 12:00:49 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

package Kernel::Output::HTML::DashboardCalendar;

use strict;
use warnings;

use vars qw($VERSION);
$VERSION = qw($Revision: 1.3 $) [1];

sub new {
    my ( $Type, %Param ) = @_;

    # allocate new hash for object
    my $Self = {%Param};
    bless( $Self, $Type );

    # get needed objects
    for (qw(Config Name ConfigObject LogObject DBObject LayoutObject ParamObject TicketObject UserID)) {
        die "Got no $_!" if ( !$Self->{$_} );
    }

    return $Self;
}

sub Run {
    my ( $Self, %Param ) = @_;

    my %Map = (
        Escalation => [ 'TicketEscalation', 'Escalation', ],
        Pending    => [ 'TicketPending', 'Reminder Reached', ],
    );

    my %Date;

    for my $Type ( sort keys %Map ) {

        my @TicketIDs = $Self->{TicketObject}->TicketSearch(

            # ticket escalations over 60 minutes (optional)
#            $Map{ $Type }->[0] . 'TimeOlderMinutes' => -30,
            # ticket escalations in 120 minutes (optional)
            $Map{ $Type }->[0] . 'TimeNewerMinutes' => ( 60 * 18 ),

            Result     => 'ARRAY',
            Permission => $Self->{Config}->{Permission} || 'ro',
            UserID     => $Self->{UserID},
            Limit      => 20,
        );
        for my $TicketID (@TicketIDs) {

            my %Ticket = $Self->{TicketObject}->TicketGet(
                TicketID => $TicketID,
                UserID   => $Self->{UserID},
            );
{'fraction_non_alphanumeric': 0.1547036432843937, 'fraction_numerical': 0.022566612289287656, 'mean_word_length': 2.2731316725978647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5310573', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1190, 'n_words': 324}