Some dynamic fields don't work

Moderator: crythias

Locked
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Some dynamic fields don't work

Post by Romaing »

Hello guys, hope the week is gonna be good :)

After reading this topic on how to do what i described above, now i need to adapt this method on OTRS 3.1 with the new dynamic field feature.
I've been reading this http://doc.otrs.org/3.1/en/html/dynamic ... ation.html

For example, is the javasccript still valid or does it need to be changed ?

if i understand correctly, i'm now supposed to create 2 new dynamic fields in the Admin -> Ticket Config -> dynamic fields page.
Guessing it's Ticket -> Text ?

After that, i'm supposed to go to the System Config, select Ticket in the list then choose the page where i'll put a key and a content (to view them in zoom view: Frontend::Agent::Ticket::ViewZoom) and that's it ?

here are 2 pics of how i poorly understand this: am i on the right way ?

Image

Image

Anyhow thanks for reading this, and best regards to you.
Last edited by Romaing on 22 May 2012, 13:48, edited 5 times in total.
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
yuri0001
Znuny superhero
Posts: 630
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: [otrs 3.1] Adding customer ip and hostname in Agent view

Post by yuri0001 »

Yes, you are in right way indeed.
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)
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: [otrs 3.1] Adding customer ip and hostname in Agent view

Post by Romaing »

Thanks for the answer Yuri, just please now tell me if it was sarcasm :lol:

[EDIT]: so, got it to work:

1/ i needed to put $Env{"REMOTE_ADDR"} instead of REMOTE_ADDR in the dynamic field setting.

2/ also needed to add the dynamic fields in Ticket -> Frontend::Customer::Ticket::ViewNew (first thought it was just cosmetic here)

And to hide the dynamic field from the customer: (CustomerTicketMessage.dtl)

Code: Select all

<!-- dtl:block:DynamicField -->
                <div class="Row Row_DynamicField_$QData{"Name"}" style="DISPLAY: none">
Last edited by Romaing on 17 May 2012, 05:26, edited 2 times in total.
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: [otrs 3.1] Adding customer ip and hostname in Agent view

Post by Romaing »

[fixed]
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: [SOLVED - otrs 3.1] Cust. ip and hostname in Agent view

Post by Romaing »

up

Do you guys have any idea why the $Env{"REMOTE_HOST"} would not work ?

I have set up 4 dynamic fields :
ip
host
browser
url referer

the 4 are displayed for the agent in 2 areas:
Ticket::Frontend::AgentTicketFreeText###DynamicField where the 4 are displayed (by the way, any idea on how to make the displayed zone longer ?)
Ticket::Frontend::AgentTicketZoom###DynamicField where only the ip and host are displayed

for the customer:
Ticket::Frontend::CustomerTicketMessage###DynamicField

And i hide from the customer with the javascript style option.

They all work fine except the host which doesn't bring anything. I have checked and rechecked for spelling errors, can't find one (and there is not much to look for).

Could this variable not work because of a config not properly done in ubuntu or something ? :?
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
yuri0001
Znuny superhero
Posts: 630
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: [otrs 3.1] Adding customer ip and hostname in Agent view

Post by yuri0001 »

Romaing wrote:Thanks for the answer Yuri, just please now tell me if it was sarcasm :lol:

[EDIT]: so, got it to work:

1/ i needed to put $Env{"REMOTE_ADDR"} instead of REMOTE_ADDR in the dynamic field setting.

2/ also needed to add the dynamic fields in Ticket -> Frontend::Customer::Ticket::ViewNew (first thought it was just cosmetic here)

And to hide the dynamic field from the customer: (CustomerTicketMessage.dtl)

Code: Select all

<!-- dtl:block:DynamicField -->
                <div class="Row Row_DynamicField_$QData{"Name"}" style="DISPLAY: none">
It was not sarcasm. :?
One question please!
"Name" in your example mean the name of Dynamic field for IP? :?
EDIT. Or it can be following when I displayed Dynamic Fields separately

Code: Select all

<!-- dtl:block:DynamicField_IP_Addr -->
                <div class="Row Row_DynamicField_$QData{"Name"}" style="DISPLAY: none">
[/quote]
where IP_Addr - the name of Dynamic field for IP, otherwise all Dynamic fields not be displayed.
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)
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: Some dynamic fields don't work

Post by Romaing »

Thanks Yuri, and hello :)
"Name" in your example mean the name of Dynamic field for IP?
Actually I didn't touch the Name field, i just put the style="DISPLAY: none" behind the one instance already there and that' just it. So it hides everything at once. I don't touch the Name field.

If i remove the style="DISPLAY: none" from Customerticketmessage.dtl the host is the only thing that doesn't display any result value, i don't understand what blocks the host variable to get picked up :?

[edit]: perhaps i should have mentionned the otrs server where host isn't picked up is hosted on a vmware esx server, where it works on my otrs test machine (might be the reason but where to look?)
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
yuri0001
Znuny superhero
Posts: 630
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: Some dynamic fields don't work

Post by yuri0001 »

One more questionю :?
Is this method works when customer logged in OTRS through proxy-server? Is displayed IP-address of customer where right?
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)
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: Some dynamic fields don't work

Post by Romaing »

yuri0001 wrote:One more questionю :?
Is this method works when customer logged in OTRS through proxy-server? Is displayed IP-address of customer where right?
i'm not gonna install a proxy server on my machine, i'm just a trainee here and the IT team here won't like that at all. :?
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
yuri0001
Znuny superhero
Posts: 630
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: Some dynamic fields don't work

Post by yuri0001 »

Sorry! Can someone tried it through a proxy? :(
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)
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: Some dynamic fields don't work

Post by Romaing »

nope, i'm all alone :lol:

I got one tiny question though:

I added another ticket dynamic field: a dropdown list that i want to display the root queues above the queue list, and use an ACL so that users can first filter a queue and make things more visible.


My problem is if i move the dynamic field bloc in the customerticketmessage.dtl between the dtl blocs for type and queues i get an error when clicking on the create ticket button.

stating that 'dtl:block:DynamicField_Filtering' isn't closed !

But the syntax is good (i open it with notepadd++ and checks with HTML language)
All i did was copy/paste the example bloc on how to use dyn fields blocks for customization above in the file.
And only replaced the $QData{"Name"} with $QData{"Filter"} (filter being the name of my dyn field)

Code: Select all

<!-- dtl:block:DynamicField_Filter -->
                <div class="Row Row_DynamicField_$QData{"Filter"}">
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
yuri0001
Znuny superhero
Posts: 630
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: Some dynamic fields don't work

Post by yuri0001 »

May be you really don't close block when pasting your code or delete line with closing comment.
Sorry, I don't specialist in Perl. :?
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)
Romaing
Znuny newbie
Posts: 60
Joined: 30 Mar 2012, 15:20
Znuny Version: 3.1.5

Re: Some dynamic fields don't work

Post by Romaing »

It's cool, i managed it :)

I'll edit my post later to show how it all works. (other newbs like me might be interested). Not a big deal at all for the seasoned otrs player :]
It was a syntax issue btw :D
OTRS 3.1.5 on Ubuntu 12.04
Database: MySQL
Module: FAQ
Locked