User Customization [SOLVED]

Moderator: crythias

Locked
Muad_Dib
Znuny newbie
Posts: 20
Joined: 20 Jul 2010, 11:28
Znuny Version: 2.4.7

User Customization [SOLVED]

Post by Muad_Dib »

Hi all,

I just want to know if it's possible to customize the forms to add/modify users in OTRS. I have users stored in an external DB (for an ERP) and as I have to make some interfaces between OTRS and ERP I want to store the IDs of the ERP users in OTRS.
I already add a field in the table "users" and I tried to modify "AdminUserForm.dtl" but without success... I'm not sure if it's the correct file to change :-)

And my problem is : how can I make the link between dtl file and the DB? If I can change the dtl file to add a new field, how it will be taken in the SQL update ?

Thanks for your replies!
Last edited by Muad_Dib on 01 Sep 2010, 22:04, edited 1 time in total.
Muad_Dib
Znuny newbie
Posts: 20
Joined: 20 Jul 2010, 11:28
Znuny Version: 2.4.7

Re: User Customization

Post by Muad_Dib »

Hi again,

So I finally make all the stuff working :-)
So if it can help: I had to modify the sub GetUserData, UserAdd and UserUpdate to manage the new field in the select, insert and update clause.
The point that almost makes me crazy is that I had to put my new field at the beginning of the update or insert statement. I firt put it at last but it doesn't work... Don't know why...

Bye
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: User Customization [SOLVED]

Post by Daniel Obee »

Couldn't you just alter the DB mapping in the Config.pm?

Just curious

Daniel
Muad_Dib
Znuny newbie
Posts: 20
Joined: 20 Jul 2010, 11:28
Znuny Version: 2.4.7

Re: User Customization [SOLVED]

Post by Muad_Dib »

tisar wrote:Couldn't you just alter the DB mapping in the Config.pm?
Hi tisar,

I haven't found any mapping in Config.pm for users... I found for customers but not for users... And the point is that I created a new field in OTRS database so I'll be surprised how it will be updated or inserted?

But if you got an idea that's more simple than what I've done, I'm interested.
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: User Customization [SOLVED]

Post by Daniel Obee »

Oh sorry, I overread the user part.

If you don't mind it's not stored in the users table directly:
For AgentUsers you got one standard (comment) and one custom field ready to use. Both are editable in Framework -> Frontend::Agent::Preferences and stored as an extra line in the table user_preferences. If that's not enough: Via a simple extra sysconfig file (see developers handbook for more) you could add as many fields as needed.

Greets
Daniel
Muad_Dib
Znuny newbie
Posts: 20
Joined: 20 Jul 2010, 11:28
Znuny Version: 2.4.7

Re: User Customization [SOLVED]

Post by Muad_Dib »

tisar wrote:Oh sorry, I overread the user part.
If you don't mind it's not stored in the users table directly:
For AgentUsers you got one standard (comment) and one custom field ready to use. Both are editable in Framework -> Frontend::Agent::Preferences and stored as an extra line in the table user_preferences. If that's not enough: Via a simple extra sysconfig file (see developers handbook for more) you could add as many fields as needed.
Hi Daniel,

I can't store it in the user_preferences because I don't want that the users can modify it and I have to set it when I create new users.

And I don't understand what you mean about "extra sysconfig file": could you please tell me more about that? I don't find something about it in the manual...

Thanks in advance
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: User Customization [SOLVED]

Post by Daniel Obee »

I meant the option to add new config items via Config File as described in http://doc.otrs.org/developer/2.4/en/html/x1431.html
I can't store it in the user_preferences because I don't want that the users can modify it and I have to set it when I create new users.
The comment is not displayed in the user preferences by default, thus they cannot change it.
Locked