Creating your own dashlet

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

User avatar
crythias
Moderator
Posts: 9920
Joined: 04 May 2010, 18:38
OTRS Version?: 4.0.x
Location: SouthWest Florida, USA
Contact:

Creating your own dashlet

Postby crythias » 25 Mar 2015, 18:11

You probably never thought about this or you did, but, is it really that hard to make your own dashlet?
Actually, it's not. Just create a file such as otrs/Kernel/Config/Files/myDashlet.xml and add params. Then go to SysConfig and make sure it's enabled.

For open tickets with multiple ServiceIDs:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
    <ConfigItem Name="DashboardBackend###0600-MyTitle" Required="0" Valid="1">
        <Description Translatable="1">Some relevant description. Explain the parameters as this is shown in SysConfig</Description>
        <Group>Ticket</Group>
        <SubGroup>Frontend::Agent::Dashboard</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
                <Item Key="Title">The title that shows for the Dashlet</Item>
                <Item Key="Description">Another description line</Item>
                <Item Key="Attributes">StateType=open;ServiceIDs=37;ServiceIDs=38;</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>


Available Parameters to Attributes are most of what you'd expect (State, SLA, Service,Queue) but those that may be available to use multiple entries must be specified multiple times, as in the above example.

Code: Select all

        TypeIDs CreatedTypeIDs StateIDs CreatedStateIDs StateTypeIDs LockIDs OwnerIDs ResponsibleIDs CreatedUserIDs
        QueueIDs CreatedQueueIDs PriorityIDs CreatedPriorityIDs ServiceIDs SLAIDs WatchUserIDs


Other multiples:

Code: Select all

        Types TypeIDs CreatedTypes CreatedTypeIDs States StateIDs CreatedStates CreatedStateIDs StateTypeIDs
        Locks LockIDs OwnerIDs ResponsibleIDs CreatedUserIDs Queues QueueIDs CreatedQueues CreatedQueueIDs
        Priorities PriorityIDs CreatedPriorities CreatedPriorityIDs Services ServiceIDs SLAs SLAIDs WatchUserIDs
OTRS 4.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

dbouvet
OTRS newbie
Posts: 11
Joined: 06 Aug 2014, 16:44
OTRS Version?: 3.3.8
Location: Lyon, France

Re: Creating your own dashlet

Postby dbouvet » 28 May 2015, 16:23

Dear Crythias,

Which are the possible values for "Permission" key?

Thanks,
David

User avatar
crythias
Moderator
Posts: 9920
Joined: 04 May 2010, 18:38
OTRS Version?: 4.0.x
Location: SouthWest Florida, USA
Contact:

Re: Creating your own dashlet

Postby crythias » 28 May 2015, 18:09

dbouvet wrote:Which are the possible values for "Permission" key?
These would be the permissions that exist in sysconfig, Ticket -> Core::Ticket, System::Permission

They are assigned in Admin, Agent<->Group
OTRS 4.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

dbouvet
OTRS newbie
Posts: 11
Joined: 06 Aug 2014, 16:44
OTRS Version?: 3.3.8
Location: Lyon, France

Re: Creating your own dashlet

Postby dbouvet » 29 May 2015, 12:04

Is it possible to put

Code: Select all

<Item Key="Permission">rw;owner</Item>

?

User avatar
crythias
Moderator
Posts: 9920
Joined: 04 May 2010, 18:38
OTRS Version?: 4.0.x
Location: SouthWest Florida, USA
Contact:

Re: Creating your own dashlet

Postby crythias » 29 May 2015, 14:35

No and unnecessary.
OTRS 4.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

dbouvet
OTRS newbie
Posts: 11
Joined: 06 Aug 2014, 16:44
OTRS Version?: 3.3.8
Location: Lyon, France

Re: Creating your own dashlet

Postby dbouvet » 29 May 2015, 16:21

You are right it is unnecessary. Values chosen for the example were not relevant.

OK only one value for the key.
Thanks a lot.

McGinkel
OTRS newbie
Posts: 4
Joined: 05 Oct 2010, 09:28
OTRS Version?: 3.0b?

Re: Creating your own dashlet

Postby McGinkel » 11 Sep 2015, 15:12

How can I set a filter that shows tickets only assigned to me ?
I understand state etc, but how do you enter the current username as each user would have a different selection.

User avatar
crythias
Moderator
Posts: 9920
Joined: 04 May 2010, 18:38
OTRS Version?: 4.0.x
Location: SouthWest Florida, USA
Contact:

Re: Creating your own dashlet

Postby crythias » 11 Sep 2015, 15:32

McGinkel wrote:How can I set a filter that shows tickets only assigned to me ?
I understand state etc, but how do you enter the current username as each user would have a different selection.

"My Tickets" for each dashlet shows tickets *locked* to you.
OTRS 4.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

McGinkel
OTRS newbie
Posts: 4
Joined: 05 Oct 2010, 09:28
OTRS Version?: 3.0b?

Re: Creating your own dashlet

Postby McGinkel » 11 Sep 2015, 15:52

Can I change that so I can see all tickets assigned to me even if they are no longer locked ?

McGinkel
OTRS newbie
Posts: 4
Joined: 05 Oct 2010, 09:28
OTRS Version?: 3.0b?

Re: Creating your own dashlet

Postby McGinkel » 11 Sep 2015, 16:01

Or can I add my tickets so i have a choice in each dashlet between my locked, my tickets, tickets in my queue and all tickets ?
(if this is not possible, can I create a new dashlet ?)


Return to “Howtos”

Who is online

Users browsing this forum: No registered users and 1 guest