HI
I have done some change to the dashboard but would like to add an Owner filter (like eg. Responsible, Watch and Locked). I tried to make changes to AgentDashboardTicketGeneric.pm by coping the section Responsible and remaining variables to Owner. However this did not produce any results. I suspect that I have to change the filter but where?
Thanks
Jan
How to add an Owner filter to dashboard
-
- Znuny newbie
- Posts: 2
- Joined: 03 Dec 2011, 16:40
- Znuny Version: 3.0
- Real Name: Jan Neergaard
- Company: Eurofins A/S
[Solved] Re: How to add an Owner filter to dashboard
I had exact the same Problem and solved it by my self.
Tested with 3.0.11 and 3.1.beta3
Here my Code
Add this line to Kernel::Config
Add this Block to Kernel::Output::HTML::DashboardTicketGeneric
and add this Block to Kernel::Output::HTML::DashboardTicketGeneric
Add this Block to AgentDashboardTicketGeneric.dtl
Tested with 3.0.11 and 3.1.beta3
Here my Code
Add this line to Kernel::Config
Code: Select all
$Self->{'Ticket::Owner'} = '1';
Code: Select all
# Look for these Code
Watcher => {
WatchUserIDs => [ $Self->{UserID}, ],
Locks => undef,
},
# BEGIN NEW
Owner => {
OwnerIDs => [ $Self->{UserID}, ],
Locks => undef,
},
# END NEW
Code: Select all
# Look for these Code
# show also responsible if feature is enabled
if ( $Self->{ConfigObject}->Get('Ticket::Responsible') ) {
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericFilterResponsible',
Data => {
%{ $Self->{Config} },
Name => $Self->{Name},
%{$Summary},
},
);
}
# BEGIN NEW
if ( $Self->{ConfigObject}->Get('Ticket::Owner') ) { #Custom Setting in Config.pm
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericFilterOwner',
Data => {
%{ $Self->{Config} },
Name => $Self->{Name},
%{$Summary},
},
);
}
# END NEW
Code: Select all
<!-- dtl:block:ContentLargeTicketGenericFilterResponsible -->
...
<!-- dtl:block:ContentLargeTicketGenericFilterResponsible -->
# BEGIN NEW
<!-- dtl:block:ContentLargeTicketGenericFilterOwner -->
<li class="$QData{"Owner::Selected"}"><a href="#" id="Dashboard$QData{"Name"}Owner">$Text{"My own Tickets"} ($QData{"Owner"})</a></li>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('#Dashboard$QData{"Name"}Owner').unbind('click').bind('click', function(){
$('#Dashboard$QData{"Name"}-box').addClass('Loading');
Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=Owner', function () {
Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
$('#Dashboard$QData{"Name"}-box').removeClass('Loading');
});
return false;
});
//]]></script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:ContentLargeTicketGenericFilterOwner -->
# END NEW
<!-- dtl:block:ContentLargeTicketGenericFilterMyQueues -->
...
<!-- dtl:block:ContentLargeTicketGenericFilterMyQueues -->
OTRS: 3.1.7 (Test) 3.1.7(Prod)
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
Re: How to add an Owner filter to dashboard
I pick the topic again on.
Is it possible to add one column with the owner there (see on the picture)?
#Edit:
i found it:
/otrs/Kernel/Output/HTML/Standart/AgentDasboardTicketGeneric.dtl
add under: <!-- dtl:block:ContentLargeTicketGenericRow --> und nach der Zeile
<div title="$QData{"Title"}">$QData{"Title","70"}</div>
<td class="small" <div title="$Quote{"$Data{"CustomerID"}"}">$Quote{"$Data{"CustomerID"}"}
<td class="small" <div title="$Quote{"$Data{"Owner"}"}">$Quote{"$Data{"Owner"}"}
Is it possible to add one column with the owner there (see on the picture)?
#Edit:
i found it:
/otrs/Kernel/Output/HTML/Standart/AgentDasboardTicketGeneric.dtl
add under: <!-- dtl:block:ContentLargeTicketGenericRow --> und nach der Zeile
<div title="$QData{"Title"}">$QData{"Title","70"}</div>
<td class="small" <div title="$Quote{"$Data{"CustomerID"}"}">$Quote{"$Data{"CustomerID"}"}
<td class="small" <div title="$Quote{"$Data{"Owner"}"}">$Quote{"$Data{"Owner"}"}
You do not have the required permissions to view the files attached to this post.
Re: How to add an Owner filter to dashboard
hi can share your code of AgentDasboardTicketGeneric.dtl
Thanks.
Thanks.
-
- Znuny newbie
- Posts: 2
- Joined: 03 Dec 2011, 16:40
- Znuny Version: 3.0
- Real Name: Jan Neergaard
- Company: Eurofins A/S
Re: How to add an Owner filter to dashboard
Thanks scareface. Thumbs up. Works for me.
-
- Znuny newbie
- Posts: 25
- Joined: 23 Oct 2013, 14:12
- Znuny Version: 3.2.11
- Real Name: Michael Steib
Re: How to add an Owner filter to dashboard
Hi Scareface
thanks for your posts, looks great but could you maybe explain where exactly and in which files the code has to be added?
Or do I have to add all the codes to AgentDashboardTicketGeneric.dtl? But where in there?
Thanks and best regards
Michael
thanks for your posts, looks great but could you maybe explain where exactly and in which files the code has to be added?
Or do I have to add all the codes to AgentDashboardTicketGeneric.dtl? But where in there?
Thanks and best regards
Michael
Re: How to add an Owner filter to dashboard
michaelsteib +1