Adding custom columns in TicketOverviewSmall - OTRS 3.3

Hello dear list, There are to a few web pages describing how to add custom Columns in TicketOverviewSmall - for instance http://techiesfromthecradle.blogspot.ch/2012/08/customizing-otrs-list-views.... This doesn't seem to be applicable any more with OTRS 3.3 - the file has completely changed, as it introduces new capabilities like sorting / filtering. Do you know of any documentation on how to add more columns on this view, specifically: - Dynamic Fields - Fields coming from a DB Customer Backend (for instance customer Language) Ideally, I'd love to be able to sort / filter them as well :) Thanks, Olivier

Let me answer (partially) to myself:
Dynamic Fields:
You need to change the configuration item "Ticket::Frontend::AgentTicketQueue###DefaultColumns".
The mention "Note: no more columns are allowed and will be discarded." in the comment for this field is misleading.
Simply add a new key with the name "DynamicField_XX" with XX being the name of the dynamic field. Et voilà, the field is then available for displaying / sorting / filtering.
DB Customer backend field:
Similar as above - just add the field in Ticket::Frontend::AgentTicketQueue###DefaultColumns. For me, this field is CustomerLanguage.
On top of this, you need to tell OTRS how to retrieve the information - I added this in Kernel/Output/HTML/TicketOverviewSmall.pm around line 1258:
# customer info (customer language)
if ( $Param{Config}->{CustomerInfo} ) {
if ( $Article{CustomerUserID} ) {
my %CustomerUser = $Self->{CustomerUserObject}->CustomerUserDataGet(
User => $Article{CustomerUserID});
if ($CustomerUser{UserLanguage}) {
$Article{CustomerLanguage} = $CustomerUser{UserLanguage};
}
}
}
Allowing Sorting / Filtering based on those values still challenges me... This is configured in Kernel/Output/HTML/TicketOverviewSmall.pm around lines 150, but it requires the definition of Filtering / Sorting functions, which is a bit tricky in my case because the data is stored in an external DB.
Olivier
On Mar 4, 2014, at 20:24, Olivier Macchioni
Hello dear list,
There are to a few web pages describing how to add custom Columns in TicketOverviewSmall - for instance http://techiesfromthecradle.blogspot.ch/2012/08/customizing-otrs-list-views....
This doesn't seem to be applicable any more with OTRS 3.3 - the file has completely changed, as it introduces new capabilities like sorting / filtering.
Do you know of any documentation on how to add more columns on this view, specifically:
- Dynamic Fields
- Fields coming from a DB Customer Backend (for instance customer Language)
Ideally, I'd love to be able to sort / filter them as well :)
Thanks,
Olivier --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Hi,
*DB Customer backend field:*
Similar as above - just add the field in Ticket::Frontend::AgentTicketQueue###DefaultColumns. For me, this field is CustomerLanguage.
On top of this, you need to tell OTRS how to retrieve the information - I added this in Kernel/Output/HTML/TicketOverviewSmall.pm around line 1258:
# customer info (customer language) if ( $Param{Config}->{CustomerInfo} ) { if ( $Article{CustomerUserID} ) { my %CustomerUser = $Self->{CustomerUserObject}->CustomerUserDataGet( User => $Article{CustomerUserID}); if ($CustomerUser{UserLanguage}) { $Article{CustomerLanguage} = $CustomerUser{UserLanguage}; } } }
Allowing Sorting / Filtering based on those values still challenges me... This is configured in Kernel/Output/HTML/TicketOverviewSmall.pm around lines 150, but it requires the definition of Filtering / Sorting functions, which is a bit tricky in my case because the data is stored in an external DB.
Olivier
or you might store this information (customer language) directly in a dynamic field, which you can then display in the queue view, without modifying any code. See here: http://doc.otrs.org/3.3/en/html/external-backends.html#dynamicfield-from-cus... --Mathias

On Mar 6, 2014, at 08:19, Mathias Braeunling
Hi,
a bit tricky in my case because the data is stored in an external DB.
Olivier
or you might store this information (customer language) directly in a dynamic field, which you can then display in the queue view, without modifying any code.
See here: http://doc.otrs.org/3.3/en/html/external-backends.html#dynamicfield-from-cus...
This seems to work fine - as I'm adding a new Dynamic Field, I need to populate it though. I've tried using a GenericAgent which executes the custom module "Kernel::System::Ticket::Event::DynamicFieldFromCustomerUser", no parameters, but this fails with such errors:
Got no CustomerUserObject! at /opt/otrs//Kernel/System/Ticket/Event/DynamicFieldFromCustomerUser.pm line 30.
Use module (Kernel::System::Ticket::Event::DynamicFieldFromCustomerUser) for Ticket (10014184/98474).
Does anyone know of a good way to do this? Thanks, Olivier
participants (2)
-
Mathias Braeunling
-
Olivier Macchioni