Create a dashlet/widget using dynamic fields
Moderator: crythias
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Create a dashlet/widget using dynamic fields
Hi
I have created 2 dynamic fields for 3rd Party Tickets (3rd Party and 3rd Party ticket number). I would now like to create a dashlet/widget like that of Agent Calendar/Upcoming Events to be able to list the open tickets which have these 2 dynamic fields filled in. Can anyone help me for the coding?
I am running OTRS 3.1.7, Windows 2008 R2, Apache, MySQL
I have created 2 dynamic fields for 3rd Party Tickets (3rd Party and 3rd Party ticket number). I would now like to create a dashlet/widget like that of Agent Calendar/Upcoming Events to be able to list the open tickets which have these 2 dynamic fields filled in. Can anyone help me for the coding?
I am running OTRS 3.1.7, Windows 2008 R2, Apache, MySQL
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
I have so far used the following link to assist me http://blog.otrs.org/2010/09/26/keep-an ... entTSearch
I created xml file in Kernel\Config\Files called 3rd Party Open Tickets.xml with the below data:
<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
<ConfigItem Name="DashboardBackend###0430-3rdPartyTicketsOpen" Required="0" Valid="1">
<Description Lang="en">Parameters for the dashboard backend. ...</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Dashboard</SubGroup>
<Setting>
<Hash>
<Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
<Item Key="Title">3rd Party Open Tickets</Item>
<Item Key="Description">3rd party tickets which need to be answered!</Item>
<Item Key="Attributes">DynamicField_3rd Party=Microsoft;StateType=open;StateType=new;</Item>
<Item Key="Filter">All</Item>
<Item Key="Time">Age</Item>
<Item Key="Limit">5</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>
I have the dashlet available and enable it but I do not get ONLY the 3rd Party Tickets related to Microsoft. In fact I get a mixture of all tickets whether 3rd Party or not
I created xml file in Kernel\Config\Files called 3rd Party Open Tickets.xml with the below data:
<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
<ConfigItem Name="DashboardBackend###0430-3rdPartyTicketsOpen" Required="0" Valid="1">
<Description Lang="en">Parameters for the dashboard backend. ...</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Dashboard</SubGroup>
<Setting>
<Hash>
<Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
<Item Key="Title">3rd Party Open Tickets</Item>
<Item Key="Description">3rd party tickets which need to be answered!</Item>
<Item Key="Attributes">DynamicField_3rd Party=Microsoft;StateType=open;StateType=new;</Item>
<Item Key="Filter">All</Item>
<Item Key="Time">Age</Item>
<Item Key="Limit">5</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>
Code: Select all
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
The documentation for DynamicField is:Cheesypuffs wrote:>DynamicField_3rd Party=Microsoft;StateType=open;StateType=new;
# check if parameter is a dynamic field and capture dynamic field name (with DynamicField_)
# in $1 and the Operator in $2
# possible Dynamic Fields options include:
# DynamicField_NameX_Equals=123;
# DynamicField_NameX_Like=value*;
# DynamicField_NameX_GreaterThan=2001-01-01 01:01:01;
# DynamicField_NameX_GreaterThanEquals=2001-01-01 01:01:01;
# DynamicField_NameX_LowerThan=2002-02-02 02:02:02;
# DynamicField_NameX_LowerThanEquals=2002-02-02 02:02:02;
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
Thanks for replying Crythias
I guess you are referring to DashboardTicketGeneric.pm, right?
Do I therefore have to unquote the comments (#) for the one I wish to use? If the dynamic field is 3rdParty, could you please tell me what would I put? I am a bit confused...
Thanks in advance
I guess you are referring to DashboardTicketGeneric.pm, right?
Do I therefore have to unquote the comments (#) for the one I wish to use? If the dynamic field is 3rdParty, could you please tell me what would I put? I am a bit confused...
Thanks in advance
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
Sure, as are you.Cheesypuffs wrote:I guess you are referring to DashboardTicketGeneric.pm, right?
no... you just have to follow the structure.Cheesypuffs wrote:Do I therefore have to unquote the comments (#) for the one I wish to use?
wrong:
correct:Cheesypuffs wrote:<Item Key="Attributes">DynamicField_3rd Party=Microsoft;StateType=open;StateType=new;</Item>
Code: Select all
<Item Key="Attributes">DynamicField_3rd Party_Equals=Microsoft;StateType=open;StateType=new;</Item>
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
Hi again
I have added your code to the xml with the following result:
<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
<ConfigItem Name="DashboardBackend###0430-3rdPartyTicketsOpen" Required="0" Valid="1">
<Description Lang="en">Parameters for the dashboard backend. ...</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Dashboard</SubGroup>
<Setting>
<Hash>
<Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
<Item Key="Title">3rd Party Open Tickets</Item>
<Item Key="Description">3rd party tickets which need to be answered!</Item>
<Item Key="Attributes">DynamicField_3rd Party_Equals=Microsoft;StateType=open;StateType=new;</Item>
<Item Key="Filter">All</Item>
<Item Key="Time">Age</Item>
<Item Key="Limit">5</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>
However I still get in the dashboard dashlet ALL tickets whether 3rd party or not
Any ideas?
Thanks again!
I have added your code to the xml with the following result:
<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
<ConfigItem Name="DashboardBackend###0430-3rdPartyTicketsOpen" Required="0" Valid="1">
<Description Lang="en">Parameters for the dashboard backend. ...</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Dashboard</SubGroup>
<Setting>
<Hash>
<Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
<Item Key="Title">3rd Party Open Tickets</Item>
<Item Key="Description">3rd party tickets which need to be answered!</Item>
<Item Key="Attributes">DynamicField_3rd Party_Equals=Microsoft;StateType=open;StateType=new;</Item>
<Item Key="Filter">All</Item>
<Item Key="Time">Age</Item>
<Item Key="Limit">5</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>
However I still get in the dashboard dashlet ALL tickets whether 3rd party or not
Any ideas?
Thanks again!
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
; is or.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
Sorry, what do you mean by ; is or. ??
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
DynamicField_3rd Party_Equals=Microsoft ORCheesypuffs wrote:<Item Key="Attributes">DynamicField_3rd Party_Equals=Microsoft;StateType=open;StateType=new;</Item>
StateType=open OR
StateType=new
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
Thanks again Crythias...
I get it now. The ; stands for OR. Instead of OR, what would be the command for AND?
By this I mean DynamicField_3rd Party_Equals=Microsoft AND
StateType=open AND
StateType=new
I am definitely making progress
I get it now. The ; stands for OR. Instead of OR, what would be the command for AND?
By this I mean DynamicField_3rd Party_Equals=Microsoft AND
StateType=open AND
StateType=new
I am definitely making progress
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
I say this because in fact the field 3rd Party has 3+ vendors (not just Microsoft) and I want to be able to see ALL possible vendors for tickets open and new
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
I really wanted you to look at this question.Cheesypuffs wrote:By this I mean DynamicField_3rd Party_Equals=Microsoft AND
StateType=open AND
StateType=new
... I'll wait ...
no?
Can the StateType be both open and new?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
I see your point...an overlook there
So maybe I should have written something like
DynamicField_3rd Party_Equals=Microsoft AND
StateType=open OR
StateType=new
Can you indicate to me what that would be in commands? I know OR now is ;.....but AND?
So maybe I should have written something like
DynamicField_3rd Party_Equals=Microsoft AND
StateType=open OR
StateType=new
Can you indicate to me what that would be in commands? I know OR now is ;.....but AND?
-
- Znuny superhero
- Posts: 631
- Joined: 17 Mar 2011, 14:40
- Znuny Version: 5.0.6
- Real Name: Yuri Kolesnikov
- Location: Russia
Re: Create a dashlet/widget using dynamic fields
Hi!
Can I ask my question here?
Can I use construction like:
<Item Key="Attributes">DynamicField_DueDate_GreaterThan=CurrentDate;StateType=open;StateType=new;</Item>
I want to replace CurrentDate with some variable which value is current date.
All idea is to display in Dashboard tickets which DynamicField_DueDate greater than current date and state is new or open.
How to do it in right way?
I'm round fool in Perl and need your help.
Sorry my bad English.
Can I ask my question here?
Can I use construction like:
<Item Key="Attributes">DynamicField_DueDate_GreaterThan=CurrentDate;StateType=open;StateType=new;</Item>
I want to replace CurrentDate with some variable which value is current date.
All idea is to display in Dashboard tickets which DynamicField_DueDate greater than current date and state is new or open.
How to do it in right way?
I'm round fool in Perl and need your help.
Sorry my bad English.
Best regards Yuri Kolesnikov
OTRS 5.0.14, ITSM 5.0.14
SUSE 13.2, MariaDB 10.0.22(productive)
OTRS 5.0.14, ITSM 5.0.14(test)
OTRS 5.0.14, ITSM 5.0.14
SUSE 13.2, MariaDB 10.0.22(productive)
OTRS 5.0.14, ITSM 5.0.14(test)
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
As I said before, in the Dynamic Field_3rd Party I have 3 or more vendors (Microsoft, Xerox, etc) and I need the attribute to search for all those tickets with the fields filled.
I have tried:
"DynamicField_3rd Party_Equals=Microsoft;Xerox;" as well as "DynamicField_3rd Party_Like=Microsoft*;Xerox*;" but since ; stands for OR, it will not show me both Microsoft and Xerox tickets. I need a code for AND
So still stuck
I have tried:
"DynamicField_3rd Party_Equals=Microsoft;Xerox;" as well as "DynamicField_3rd Party_Like=Microsoft*;Xerox*;" but since ; stands for OR, it will not show me both Microsoft and Xerox tickets. I need a code for AND
So still stuck
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
try saved searches.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
I know I can do this and it works using a search template but what I wanted to have was a dashlet on my Dashboard
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
DynamicField_3rd Party_Equals=Microsoft;DynamicField_3rd Party_Equals=Xerox;
(careful about space in the fieldname...)
don't worry about state=new; state=open.
(careful about space in the fieldname...)
don't worry about state=new; state=open.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
Hi Crythias
I still only get one ticket showing up from only 1 of the vendors when I know there are more than 1. It seems like the ; chooses one vendor or the other
I put in the attributes DynamicField_3rd Party_Equals=Microsoft;DynamicField_3rd Party_Equals=Xerox;
and I only get the ticket of Xerox showing. But when I do a search I see another from Microsoft....hmmmm
A mindboggling situation here as if I can do a search totally fine I should be able to get a dashlet working with the same search criteria...unless the search format is different.....if only I could see the underlying code for the search to then copy into the attributes part of the dashlet
I still only get one ticket showing up from only 1 of the vendors when I know there are more than 1. It seems like the ; chooses one vendor or the other
I put in the attributes DynamicField_3rd Party_Equals=Microsoft;DynamicField_3rd Party_Equals=Xerox;
and I only get the ticket of Xerox showing. But when I do a search I see another from Microsoft....hmmmm
A mindboggling situation here as if I can do a search totally fine I should be able to get a dashlet working with the same search criteria...unless the search format is different.....if only I could see the underlying code for the search to then copy into the attributes part of the dashlet
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
save the search then use the button for the saved search to get a bookmarkable link.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 27
- Joined: 20 Jun 2012, 10:50
- Znuny Version: 3.1.6
Re: Create a dashlet/widget using dynamic fields
I have the search saved in a template. When I click on Profile Link I get
http://pq9otrs01/otrs/index.pl?Action=A ... ket%20List
How can this help for my dashlet?
http://pq9otrs01/otrs/index.pl?Action=A ... ket%20List
How can this help for my dashlet?
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Create a dashlet/widget using dynamic fields
Guess it doesn't. I don't know how to help you. However, you may consider that this is too important to be a dynamic field and make it a queue or service.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
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
-
- Znuny newbie
- Posts: 15
- Joined: 05 Apr 2017, 11:43
- Znuny Version: OTRS 4.0.x
Re: Create a dashlet/widget using dynamic fields
Hi crythias,
sorry to open up and reply in this thread but can you answer this since its related in dynamic field.
here's what I'am trying to do.
I want to show all ticket except ticket with Problem Location with "GMA"
I try the parameter in the documentation but still include the ticket with Problem Location "GMA" .
sorry to open up and reply in this thread but can you answer this since its related in dynamic field.
here's what I'am trying to do.
I want to show all ticket except ticket with Problem Location with "GMA"
I try the parameter in the documentation but still include the ticket with Problem Location "GMA" .
Code: Select all
<Item Key="Attributes">DynamicField_locprob_Not_Equals=GMA;</Item>
<Item Key="Attributes">DynamicField_locprob_Equals!=GMA;</Item>
<Item Key="Attributes">DynamicField_locprob_Equals=-GMA;</Item>