How to show Dynamic Field in CSV format

Moderator: crythias

Post Reply
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

How to show Dynamic Field in CSV format

Post by Gunjan »

Hi,

I want to export Dynamic Fields in CSV format on Customer interface. I have a minor problem. I went to Ticket -> Frontend::Customer::Ticket::ViewSearch and then added the field as follows:
pic.png
but I don't know what should I write in Content column, the field is not exported in csv yet! Please help me!

Thanks!
Gunjan
You do not have the required permissions to view the files attached to this post.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to show Dynamic Field in CSV format

Post by reneeb »

As you added the config option you should know why you have chosen a hash. If you just need a list of fields you want to export you could also use an array...

This is an option of stock OTRS. Just insert "1"...

I would recommend that you have a look at the code that is using such config options and don't know what they are for. You want to develop OTRS customizations, so you should know the basic parts of the Perl code. For that example you can look at Kernel/Modules/CustomerTicketSearch.pm (https://github.com/OTRS/otrs/blob/rel-3 ... ch.pm#L108), There you see that the config option is used to filter the DynamicFields. So you can look at Kernel/System/DynamicField.pm method DynamicFieldList. See https://github.com/OTRS/otrs/blob/rel-3 ... ld.pm#L521 In the docs to that module you see

Code: Select all

FieldFilter => { # optional, only active fields (non 0) will be returned
  ItemOne => 1,
  ItemTwo => 2,
  ItemThree => 1,
  ItemFour => 1,
  ItemFive => 0,
},
If you set the field value of the sysconfig option to 0 that field is deactivated for the CSV export (not shown), any other value will activate the field for the export.
Last edited by reneeb on 13 Jan 2014, 09:48, edited 1 time in total.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to show Dynamic Field in CSV format

Post by jojo »

try with content 1
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

Hi,

I tried with content '1', but still dynamic fields are not exported in csv format! what do I need to do?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to show Dynamic Field in CSV format

Post by reneeb »

Then you should debug! Add lots of lines like

Code: Select all

$Self->{LogObject}->Log( Priority => error => Message => "<Message>" );
to the code (Kernel/Modules/CustomerTicketSearch.pm), and replace <Message> with a value that helps you to debug the code.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to show Dynamic Field in CSV format

Post by jojo »

on my system it works. Check if the name of the field is written correctly
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

Can you please describe the whole procedure once?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to show Dynamic Field in CSV format

Post by jojo »

Put the name on the left column and the 1 on the right column
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
wurzel
Znuny guru
Posts: 3232
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: How to show Dynamic Field in CSV format

Post by wurzel »

Hi,

... and it is case sensitive, I think ;)

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

ya I have done the same! I don't know what is the issue then!
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to show Dynamic Field in CSV format

Post by jojo »

Delete Caches.

Are you using the CSV Export on the search? Is your OTRS version the latest one?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
diginin
Znuny expert
Posts: 213
Joined: 11 Feb 2008, 12:04
Znuny Version: CVS

Re: How to show Dynamic Field in CSV format

Post by diginin »

Be sure you put it in

SearchCSVDynamicField

and not in

Ticket::Frontend::AgentTicketSearch###Defaults###DynamicField

or

Ticket::Frontend::AgentTicketSearch###DynamicField
Shawn Beasley
Contact me per XING
Contact me per LinkedIN

OTRS CVS on Ubuntu Stable.

Image
signature by diginin74, on Flickr

Computers are like air conditioners, when you open windows they are useless.



P.S. (für Leser meiner Deutschtexte) Rechtschreibfehler bitte mit s/.*/$KORREKTUR/ ersetzen.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to show Dynamic Field in CSV format

Post by jojo »

Ticket_-__Frontend__Agent__Ticket__ViewSearch_-_SysConfig_-_Admin_-_OTRS.png
You do not have the required permissions to view the files attached to this post.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

I am also doing the same but still not visible! One important thing is that I am doing this on customer interface not on agent interface! Does it matter? and it is working for agent interface but not customer interface!
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to show Dynamic Field in CSV format

Post by jojo »

well, this might be a bug then.

Please file it: http://bugs.otrs.org
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
diginin
Znuny expert
Posts: 213
Joined: 11 Feb 2008, 12:04
Znuny Version: CVS

Re: How to show Dynamic Field in CSV format

Post by diginin »

is it a ticket field, or article?
Shawn Beasley
Contact me per XING
Contact me per LinkedIN

OTRS CVS on Ubuntu Stable.

Image
signature by diginin74, on Flickr

Computers are like air conditioners, when you open windows they are useless.



P.S. (für Leser meiner Deutschtexte) Rechtschreibfehler bitte mit s/.*/$KORREKTUR/ ersetzen.
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

ticket field
diginin
Znuny expert
Posts: 213
Joined: 11 Feb 2008, 12:04
Znuny Version: CVS

Re: How to show Dynamic Field in CSV format

Post by diginin »

what type of field is it drop down, etc....?
Shawn Beasley
Contact me per XING
Contact me per LinkedIN

OTRS CVS on Ubuntu Stable.

Image
signature by diginin74, on Flickr

Computers are like air conditioners, when you open windows they are useless.



P.S. (für Leser meiner Deutschtexte) Rechtschreibfehler bitte mit s/.*/$KORREKTUR/ ersetzen.
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

sorry I din't get it! Can you please explain?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to show Dynamic Field in CSV format

Post by reneeb »

When you create a dynamic field you have to define what kind (type) of field it is...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: How to show Dynamic Field in CSV format

Post by Gunjan »

oh ya it is dropdown.
Post Reply