Make CustomerID read-only

Moderator: crythias

Locked
pmontesd
Znuny newbie
Posts: 21
Joined: 24 Nov 2013, 01:29
Znuny Version: 4.0.24
Real Name: Pablo Montesdeoca
Company: Inerza

Make CustomerID read-only

Post by pmontesd »

Hello,

As I get CustomerID attribute from LDAP, I would like to make that field read-only on the new ticket form and on the change customer form. I don't want agents to mess with that field, so that I can maintain consistency in company names.

Any help would be appreciated.

Regards,
OTRS 3.3.5 - ITSM Bundle 3.3.5 on Centos 6.4 with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Make CustomerID read-only

Post by crythias »

Information from LDAP is always read-only.
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
pmontesd
Znuny newbie
Posts: 21
Joined: 24 Nov 2013, 01:29
Znuny Version: 4.0.24
Real Name: Pablo Montesdeoca
Company: Inerza

Re: Make CustomerID read-only

Post by pmontesd »

Thanks crythias,

I've found in LDAP mapping of file Config.pm the following lines:
Map => [
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
...
[ 'UserCustomerID', 'CustomerID', 'businessCategory', 0, 1, 'var', '', 0 ],
...
]

I suppose that if readonly were set to 1, CustomerID would be readonly as crythias says. Will anyone confirm this? I won't be able to test it until tomorrow :(

Regards,
OTRS 3.3.5 - ITSM Bundle 3.3.5 on Centos 6.4 with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod.
pmontesd
Znuny newbie
Posts: 21
Joined: 24 Nov 2013, 01:29
Znuny Version: 4.0.24
Real Name: Pablo Montesdeoca
Company: Inerza

Re: Make CustomerID read-only

Post by pmontesd »

Hello:

It does not work!! :( :( :(

I guess it takes the value from LDAP attribute, but from then on, value can changed. After all, CostumerID is stored in the database (ticket table, I think).

Could anyone tell me how to make a field in a form read-only, specifically in New Phone Ticket form and Customer form.

Kind regards,
OTRS 3.3.5 - ITSM Bundle 3.3.5 on Centos 6.4 with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Make CustomerID read-only

Post by crythias »

The field is read only with regard to the customer's information. It's always overwriteable in the ticket.
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
schulmann
Znuny wizard
Posts: 477
Joined: 20 Nov 2011, 16:08
Znuny Version: 6.5.11
Real Name: Schulmann

Re: Make CustomerID read-only

Post by schulmann »

In OTRS version 3.3.5 you could try to insert the string "readonly" in the relevant line in the file ~otrs/Kernel/Output/HTML/Standard/AgentTicketPhone.dtl.
This should work for a new phone ticket.
Znuny6/Debian/ESXi
pmontesd
Znuny newbie
Posts: 21
Joined: 24 Nov 2013, 01:29
Znuny Version: 4.0.24
Real Name: Pablo Montesdeoca
Company: Inerza

Re: Make CustomerID read-only

Post by pmontesd »

Thanks a lot, schulmann. That's just what I was looking for.

I'm looking forward to testing it!!!!
OTRS 3.3.5 - ITSM Bundle 3.3.5 on Centos 6.4 with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod.
pmontesd
Znuny newbie
Posts: 21
Joined: 24 Nov 2013, 01:29
Znuny Version: 4.0.24
Real Name: Pablo Montesdeoca
Company: Inerza

[SOLVED] Re: Make CustomerID read-only

Post by pmontesd »

I've modified the following files according to schulmann suggestion:
~otrs/Kernel/Output/HTML/Standard/AgentTicketPhone.dtl
~otrs/Kernel/Output/HTML/Standard/AgentTicketCustomer.dtl
~otrs/Kernel/Output/HTML/Standard/AgentTicketEmail.dtl

and it seems to work!!!
OTRS 3.3.5 - ITSM Bundle 3.3.5 on Centos 6.4 with Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod.
Locked