OPAR - OPM Package ARchive

Browseable collection of plugins for the popular ticket system software Znuny and ((OTRS)) Community Edition.


GenericDashboardStats

Version
5.0.2
Other Versions
6.0.6, 6.0.7, 6.0.8,
Uploaded by/on
reneeb on 19 Jun 2018
Framework
5.0.x
Links
Download Website
Description
A more generic Dashboard stats widget.

Rate/comment this package

NAME

GenericDashboardStats

DESCRIPTION

As of today (Aug 2012) the 7 day statistic widget for the dashboard knows only two stats: closed tickets and created tickets.

This is not enough and to add new stats to that widget or change the current ones you need programming skills.

GenericDashboardStats allows to add/change stats easily with new configuration files for the SysConfig. So you can show the stats you want.

CREATE NEW STATS

To create new stats you have to add only your own configuration file. The subsequent sections show different types of stats.

The "standard" closed ticket graph

Create a file $OTRS_HOME/Kernel/Config/Files/AnyName.xml where "AnyName" can be whatever you want. Though I recommend to name it the same way you want to name the graph.

The XML file has this content:

  <?xml version="1.0" encoding="utf-8"?>
  <otrs_config version="1.0" init="Application">
    <CVS>$Id: Ticket.xml,v 1.500 2012/02/14 08:59:22 mg Exp $</CVS>
    <ConfigItem Name="GenericDashboardStats::Stats###030-Closed" Required="0" Valid="1">
        <Description Translatable="1">How many tickets were created the day</Description>
        <Group>GenericDashboardStats</Group>
        <SubGroup>Stats</SubGroup>
        <Setting>
            <Hash>
                <Item Key="OptionKey">ClosedStats</Item>
                <Item Key="type">TicketClose</Item>
                <Item Key="color">#eeff00</Item>
                <Item Key="label">Closed</Item>
            </Hash>
        </Setting>
    </ConfigItem>
  </otrs_config>

That's it! Nothing more.

Now, what does the settings mean?

  • OptionKey

    The OptionKey is just a unique key for this graph. This is used to define the name of an other SysConfig option that defines more search parameters (see second example below).

  • type

    Define what time-parameter is used for the ticket search. You can use the following values:

    • TicketCreate

      Tickets created on the given day.

    • TicketClose

      Tickets closed on the given day.

    • TicketChange

      Tickets changed on the given day.

    • TicketPending

    • TicketEscalation

    • TicketEscalationUpdate

    • TicketEscalationResponse

    • TicketEscalationSolution

    • ArticleCreate

      articles with create time after ... (article newer than this date).

  • color

    Color of the graph.

  • label

    Mouse over label for the graph.

An other example: Show graph of ticket that were created in queue "Junk"

  <?xml version="1.0" encoding="utf-8"?>
  <otrs_config version="1.0" init="Application">
      <ConfigItem Name="GenericDashboardStats::Stats###001-Created-Junk" Required="0" Valid="1">
          <Description Translatable="1">How many tickets were created the day in the queue Junk</Description>
          <Group>GenericDashboardStats</Group>
          <SubGroup>Stats</SubGroup>
          <Setting>
              <Hash>
                  <Item Key="OptionKey">CreatedJunkStats</Item>
                  <Item Key="type">TicketCreate</Item>
                  <Item Key="color">#eeff00</Item>
                  <Item Key="label">Created In Junk</Item>
              </Hash>
          </Setting>
      </ConfigItem>
      <ConfigItem Name="CreatedJunkStats###Queues" Required="0" Valid="1">
          <Description Translatable="1">Define the Queues the CreatedJunkStats stat is for</Description>
          <Group>GenericDashboardStats</Group>
          <SubGroup>CreatedJunkStats</SubGroup>
          <Setting>
              <Array>
                  <Item>Junk</Item>
              </Array>
          </Setting>
      </ConfigItem>
  </otrs_config>

The first ConfigItem part is described above. The second one adds more search paramters. The name of the item is created by the value of OptionKey in the first config option then "###" and the last part of the name is the search option. At http://otrs.perl-services.de/docs/otrs/rel-3_3/kernel_system_ticketsearch.html you can see all the options for the ticket search.

REPOSITORY & BUGS

The code repository and a bugtracker are available at http://github.com/reneeb/otrs-GenericDashboardStats

AUTHOR AND LICENCE

  License: AGPL

Renee Baecker info@perl-services.de

Comments