OTRS 3.2 | A lot of tweaks

Adding columns to dashboard
AgentDashboardTicketGeneric.dtl

<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
            <td class="W10pc">
                <a href="$Env{"Baselink"}Action=AgentTicketZoom;TicketID=$Data{"TicketID"}" title="$QData{"Title"}" class="AsBlock MasterActionLink">$Data{"TicketNumber"}</a>
            </td>
            <td class="W50pc">
                <div title="$QData{"Title"}">$QData{"Title","70"}</div>
            </td>
            <td>$QData{"Time"}</td>
            <td>$QData{"Queue"}</td>
            <td>$QData{"DynamicField_Deadline"}</td>
        </tr>

Adding/tuning priority colors
Core.Default.css

.Flag span.PriorityID-9 {
    background-color:#ffa500;
}

Increasing the number of possible dashboard rows per block.
DashboardTicketGeneric.pm

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

    my @Params = (
        {
            Desc  => 'Shown Tickets',
            Name  => $Self->{PrefKey},
            Block => 'Option',

            #            Block => 'Input',
            Data => {
                5  => ' 5',
                10 => '10',
                15 => '15',
                20 => '20',
                25 => '25',
                50 => '50',
            },
            SelectedID  => $Self->{PageShown},
            Translation => 0,
        },
    );

    return @Params;
}

Using dynamic fields on dashboard.
DashboardTicketGeneric.pm

for my $TicketID ( @{$TicketIDs} ) {
        $Count++;
        next if $Count < $Self->{StartHit};
        my %Ticket = $Self->{TicketObject}->TicketGet(
            TicketID      => $TicketID,
            UserID        => $Self->{UserID},
            # SET THIS TO 1
            DynamicFields => 1,
        );

Adding Dashboard blocks/modules
Ticket.xml

 <ConfigItem Name="DashboardBackend###0140-TicketTypeWithDeadline" Required="0" Valid="1">
        <Description Translatable="1">Parameters for the dashboard backend of the ticket pending reminder overview of the agent interface. "Limit" is the number of entries shown by default. "Group" is used to restrict the access to the plugin (e. g. Group: admin;group1;group2;). "Default" determines if the plugin is enabled by default or if the user needs to enable it manually. "CacheTTLLocal" is the cache time in minutes for the plugin.</Description>
        <Group>Ticket</Group>
        <SubGroup>Frontend::Agent::Dashboard</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
                <Item Key="Title">New Ticket with Deadlines</Item>
                <Item Key="Description">All new tickets, these tickets are of type withDeadline</Item>
                <Item Key="Attributes">StateType=new;</Item>
                <Item Key="Filter">All</Item>
                <Item Key="Time">Age</Item>
                <Item Key="Limit">10</Item>
                <Item Key="Permission">rw</Item>
                <Item Key="Block">ContentLarge</Item>
                <Item Key="Group"></Item>
                <Item Key="Default">1</Item>
                <Item Key="CacheTTLLocal">0.5</Item>
            </Hash>
        </Setting>
    </ConfigItem>
    <ConfigItem Name="DashboardBackend###0150-TicketsClosed" Required="0" Valid="1">
        <Description Translatable="1">Parameters for the dashboard backend of the ticket pending reminder overview of the agent interface. "Limit" is the number of entries shown by default. "Group" is used to restrict the access to the plugin (e. g. Group: admin;group1;group2;). "Default" determines if the plugin is enabled by default or if the user needs to enable it manually. "CacheTTLLocal" is the cache time in minutes for the plugin.</Description>
        <Group>Ticket</Group>
        <SubGroup>Frontend::Agent::Dashboard</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
                <Item Key="Title">Closed Tickets</Item>
                <Item Key="Description">All closed tickets</Item>
                <Item Key="Attributes">StateType=closed;</Item>
                <Item Key="Filter">All</Item>
                <Item Key="Time">Age</Item>
                <Item Key="Limit">10</Item>
                <Item Key="Permission">rw</Item>
                <Item Key="Block">ContentLarge</Item>
                <Item Key="Group"></Item>
                <Item Key="Default">1</Item>
                <Item Key="CacheTTLLocal">0.5</Item>
            </Hash>
        </Setting>
    </ConfigItem>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s