Quantcast
Channel: OTRS Community Blog » Dashboard
Viewing all articles
Browse latest Browse all 5

Keep an eye on certain customers

$
0
0

This post is about a customer’s request:

Hi, maybe you can help me please. :)
I have a common queue for all calls, I would like to create an ACL where a specific group can see only tickets for a single customer on StatusView. [...]

Well, no, that’s not possible via ACL as you can’t hide tickets from an agent with ACL. But there are two (hopefully equal) options for you – use a saved search profile or add your own plugin to the Dashboard.

Use a customized search

The easy solution – each agent has the option to save a search profile as a template for later re-use:

Save the search profile

Save the search profile

Use the saved search profile

Use the saved search profile

Now we want a quick access to this search profile from everywhere inside the OTRS and thus enable access to search-profiles from the navigation bar via the SysConfig

Ticket -> Frontend::Agent::NavBarModule
  Frontend::NavBarModule###1-Ticket::TicketSearchProfile:
  Agent interface module to access search profiles via nav bar.
Search profiles in the navigation bar

Search profiles in the navigation bar

Use a customized Dashboard plugin

Now the more challenging but nicer option – add your own Dashlet to the Dashboard.

The known Dashlets “Reminder Tickets”, “Escalated Tickets”, etc. are in fact ticket searches performed for each Agent calling the Dashboard. The searches are defined initially in an XML file and can be altered via the SysConfig interface later on.

Step 1 – create your own XML file

OTRS delivers its default configuration as XML files which are placed to

Kernel/Config/Files

The Dashboard description is part of the Ticket area and can be found in Ticket.xml (just search for Dashboard in the file).

We create our own configuration file, name it MyConfig.xml and add the necessary XML container to the file:

<?xml version="1.0" encoding="utf-8"?>
 <otrs_config version="1.0" init="Application">
</otrs_config>

Step 2 – copy & paste a Dashlet

From the mentioned Ticket.xml we get the description of a Dashlet e.g. “Open Tickets” and paste it to our file which should then look like this:

<?xml version="1.0" encoding="utf-8"?>
 <otrs_config version="1.0" init="Application">
  <ConfigItem Name="DashboardBackend###0130-TicketOpen" Required="0" Valid="1">
  <Description Lang="en">Parameters  for the dashboard backend. ...</Description>
  <Description Lang="de">Parameter  für das Dashboard Backend. ... </Description>
  <Group>Ticket</Group>
  <SubGroup>Frontend::Agent::Dashboard</SubGroup>
  <Setting>
   <Hash>
    <Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
    <Item Key="Title">Open Tickets / Need to be answered</Item>
    <Item Key="Description">Tickets which need to be answered!</Item>
    <Item Key="Attributes">StateType=open;</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>
</otrs_config>

Step 3 – modify the configuration to your needs

The interesting parts are

  • Attributes – the parameters to AgentTicketSearch()
  • Filter – which tickets should be considered
  • Time – which time should be shown in the Dashlet
  • Limit – how many tickets should be shown per screen
  • Permissions – which permissions does the agent need on a ticket so it gets shown
  • Group – which group (and through Roles – which Agent) should see this Dashlet
  • Default – is the Dashlet activated by default or optional for the Agent
  • CacheTTLLocal – how often should the content be refreshed (in minutes)

As I stated earlier, the Dashlets are just a ticket search. If you have a look at the Attributes of the Dashlet “Reminder Tickets” – <Item Key=”Attributes”>TicketPendingTimeOlderMinutes=1;StateType=pending reminder;SortBy=PendingTime;OrderBy=Down; </Item> – you get an impression what could be possible.

The AgentTicketSearch() function is described in the Developer manual [AgentTSearch].

The Filter is one of the following values

  • Locked
  • Watcher
  • Responsible
  • MyQueues
  • All

The Time can be one out of these settings

  • Age
  • UntilTime
    (for pending states)
  • General escalation info of nearest escalation type
    • EscalationTimeWorkingTime
      (seconds of working/service time till escalation, e. g. “1800″
    • EscalationTime
      (seconds total till escalation of nearest escalation time type – response, update or solution time, e. g. “3600″)
  • Detail escalation info about first response, update and solution time
    • FirstResponseTimeWorkingTime
      (seconds of working/service time till escalation, e. g. “1800″)
    • FirstResponseTime
      (seconds total till escalation, e. g. “3600″)
    • UpdateTimeWorkingTime
      (seconds of working/service time till escalation, e. g. “1800″)
    • UpdateTime
      (seconds total till escalation, e. g. “3600″)
    • SolutionTimeWorkingTime
      (seconds of working/service time till escalation, e. g. “1800″)
    • SolutionTime
      (seconds total till escalation, e. g. “3600″)

For the initial request we just need the CustomerID, the open/new state and a permission group. Please also change the name and position of the Dashlet!

So here’s the final myConfig.xml

<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
 <ConfigItem Name="DashboardBackend###0600-TicketCustomerABC" Required="0" Valid="1">
  <Description Lang="en">Parameters  for the dashboard backend. ...</Description>
  <Description Lang="de">Parameter  für das Dashboard Backend. ...</Description>
  <Group>Ticket</Group>
  <SubGroup>Frontend::Agent::Dashboard</SubGroup>
  <Setting>
   <Hash>
    <Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
    <Item Key="Title">Tickets for Customer ABC</Item>
    <Item Key="Description">All tickets for customer ABC</Item>
    <Item Key="Attributes">CustomerID=foobar.inc;StateType=open;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">G_CustomerABC</Item>
    <Item Key="Default">1</Item>
    <Item Key="CacheTTLLocal">5</Item>
   </Hash>
  </Setting>
 </ConfigItem>
</otrs_config>

Step 4 – apply the new setting to the system

Simply run
perl bin/otrs.RebuildConfig.pl
and you have the new Dashlet definition available in your SysConfig

Ticket -> Frontend::Agent::Dashboard
DashboardBackend###0600-TicketCustomerABC
Configuration via SysConfig

Configuration via SysConfig

and your Dashboard

Our example Dashlet

Our example Dashlet

Further Reading

[AgentTSearch] – http://dev.otrs.org/2.4/Kernel/System/Ticket.html#item_ticketsearch


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles



Latest Images