Column for Dynamic Field display in Dashboard

Moderator: crythias

Locked
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Column for Dynamic Field display in Dashboard

Post by kruegerM »

Being able to add specific dynamic fields/values to my custom dashlet searches is great. I'd like to take that one step further - I have a couple dynamic fields I would like to add as columns to dashlet displays. In the manner of $QData{"Owner"}, $QData{"State"}, I'd like to add DynamicField_ConfDate (date field) - - but $QData{"DynamicField_ConfDate"} isn't working.

Is it possible to add a dynamic field as a column to a dashlet display, or am I spinning my wheels?

Thanx!

3.1.11/Linux OS
Jensito
Znuny newbie
Posts: 47
Joined: 08 Oct 2009, 10:49
Znuny Version: 4.0.10

Re: Column for Dynamic Field display in Dashboard

Post by Jensito »

Hi there,

I know this is rather old, but I was struggling with the exact same problem. Then i read the following in the announcement of OTRS 3.1.0 beta:

* Changed the default behaviour of TicketGet() and ArticleGet() to NOT
return the dynamic field values for performance reasons. If you need
them, pass DynamicFields => 1.

So I edited Kernel/Output/HTML/DashboardTicketGeneric.pm on line 357 (OTRS-Version 3.2.6) to DynamicFields => 1.

Code: Select all

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


Now I can edit Kernel/Output/HTML/Standard/AgentDashboardTicketGeneric.dtl and use <td>$QData{"DynamicField_*"}</td>.
OTRS 4.0.10 mit FAQ und Systemmonitoring auf OpenSuSE 11.3
fayhsa
Znuny newbie
Posts: 2
Joined: 17 Jun 2013, 11:58
Znuny Version: 003.2

Re: Column for Dynamic Field display in Dashboard

Post by fayhsa »

Jensito wrote:Hi there,

I know this is rather old, but I was struggling with the exact same problem. Then i read the following in the announcement of OTRS 3.1.0 beta:

* Changed the default behaviour of TicketGet() and ArticleGet() to NOT
return the dynamic field values for performance reasons. If you need
them, pass DynamicFields => 1.

So I edited Kernel/Output/HTML/DashboardTicketGeneric.pm on line 357 (OTRS-Version 3.2.6) to DynamicFields => 1.

Code: Select all

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


Now I can edit Kernel/Output/HTML/Standard/AgentDashboardTicketGeneric.dtl and use <td>$QData{"DynamicField_*"}</td>.
Wow Pretty cool
Thanks Anyway... :)
Locked