(SOLVED) Add columns to Status View (S)

Moderator: crythias

Locked
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

(SOLVED) Add columns to Status View (S)

Post by morecw »

Hello team,

I'm sorry if this has been posted elsewhere but for the life of me I can't find the answer!

Can anyone tell me how to add columns e.g Types, to the Status View (S)?

Thanks very much!
Last edited by morecw on 05 Jul 2012, 16:59, edited 1 time in total.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
artjoms15
Znuny advanced
Posts: 121
Joined: 30 Aug 2011, 10:48
Znuny Version: 3.3.8 && 4.0.9
Real Name: Artjoms Petrovs
Location: Latvia

Re: Add columns to Status View (S)

Post by artjoms15 »

Open your TicketOverviewSmall.dtl file and in HTML columns add new <th> tag and <td> </td>tag below And between td tags insert the variable $Param{Type}. Hope it will work

Cheers,
A.
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Add columns to Status View (S)

Post by morecw »

Thanks for the reply.

I added these two parts to AgentTicketOverviewSmall.dtl, but it doesn't work. No errors, it just doesn't appear! Any suggestions?

<!-- dtl:block:OverviewNavBarPageType -->
<th class="Type $QData{"CSS"}">
<a name="OverviewControl" href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=Type;OrderBy=$LQData{"OrderBy"}">$Text{"Type"}</a>
</th>
<!-- dtl:block:OverviewNavBarPageType -->




<!-- dtl:block:RecordTicketType -->
<td>
<div title="$QData{"Type"}">$QData{"Type","30"}</div>
<!-- dtl:block:RecordTicketType -->
You do not have the required permissions to view the files attached to this post.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
artjoms15
Znuny advanced
Posts: 121
Joined: 30 Aug 2011, 10:48
Znuny Version: 3.3.8 && 4.0.9
Real Name: Artjoms Petrovs
Location: Latvia

Re: Add columns to Status View (S)

Post by artjoms15 »

In Kernel/Output/HTML/TicketOverviewSmall.pm (according perl module) there is no such variable exported Type, so you should add it manually ;)

In my opinion all you should do change this line 315

Code: Select all

        my @Col = (qw(TicketNumber Age State Lock Queue Owner CustomerID));
to

Code: Select all

  my @Col = (qw(TicketNumber Age State Lock Queue Owner CustomerID Type));
And keep the changes made to DTL file ;)

Cheers,
A.
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Add columns to Status View (S)

Post by morecw »

Well.. that's done SOMETHING! :) the Type column is there now but no data underneath and the alignment is all wrong now
You do not have the required permissions to view the files attached to this post.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
artjoms15
Znuny advanced
Posts: 121
Joined: 30 Aug 2011, 10:48
Znuny Version: 3.3.8 && 4.0.9
Real Name: Artjoms Petrovs
Location: Latvia

Re: Add columns to Status View (S)

Post by artjoms15 »

Firstly
Please close the </td> tag in the <!-- dtl:block:RecordTicketType -->
Secondly
I am not sure that this block (RecordTicketType) is registered in .pm file so you should add such code to TicketOverviewSmall.pm approx. at line 540

Code: Select all

            $Self->{LayoutObject}->Block(
                Name => 'RecordTicketType',
                Data => { %Article},
            );
It will provide the block RecordTicketType with data about the last article of a ticket (and info about the ticket itself)
After that the data should appear ;)

Cheers,
A.
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Add columns to Status View (S)

Post by morecw »

FANTASTIC!! I moved a few things around in order to insert 'Types' as a middle column, but you gave me a much better understanding of how to do it.

Thank you so much :D :)
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
Locked