Customer Company: neues Feld (Dropdown) [CLOSED]

Hilfe zu OTRS Problemen aller Art
Post Reply
Rotyn
Znuny newbie
Posts: 68
Joined: 21 Aug 2012, 17:11
Znuny Version: 3.3.5
Real Name: Rudy

Customer Company: neues Feld (Dropdown) [CLOSED]

Post by Rotyn »

Hallo Kollegen

Ich habe in der Tabelle "customer_company" ein neue Spalte eingefuegt: "projectm" (soll den zustaendigen Projektleiter beinhalten)

In der Darstellung der Companyliste kein Problem. Habe ich hinbekommen. Das Feld wird angezeigt.

In der Edit-Maske der Company fast kein Problem, das Feld "Projektleier" wird angezeigt und kann ausgefuellt werden, aber:

(a) Ich wuerde dieses Feld gerne als DropDown-Auswahl anbieten.
(b) Die Auswahl soll sich aus der Liste der Agents populieren (also alle Eintraege der Tabelle "users" anbieten) und die id aus der Tabelle "user" abspeichern

Kann mir jemand helfen?

Danke
(Euer Noob-) Rudy :lol:
Last edited by Rotyn on 08 Sep 2012, 18:36, edited 1 time in total.
Testing & Productive: OTRS::ITSM 3.3.5 on CentOS 6.5 and MySQL
Packages: All included
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Customer Company: neues Feld (Dropdown)

Post by jojo »

a ist möglich
b nicht
"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
Rotyn
Znuny newbie
Posts: 68
Joined: 21 Aug 2012, 17:11
Znuny Version: 3.3.5
Real Name: Rudy

Re: Customer Company: neues Feld (Dropdown)

Post by Rotyn »

Beim Anlegen des "customer_user" gibt es doch diese Funktionalitaet (Voraussetzung CustomerCompanySupport => 1):

Als CustomerID wird ein DropDown angeboten, welches sich aus der Tabelle "customer_company" populiert

Warum ist also nicht ein "selbstgestricktes Feld" mit der gleichen Funktion moeglich?

Gruss
Rudy
Testing & Productive: OTRS::ITSM 3.3.5 on CentOS 6.5 and MySQL
Packages: All included
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Customer Company: neues Feld (Dropdown)

Post by jojo »

Programmiertechnisch geht das natürlich
"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
Rotyn
Znuny newbie
Posts: 68
Joined: 21 Aug 2012, 17:11
Znuny Version: 3.3.5
Real Name: Rudy

Re: Customer Company: neues Feld (Dropdown)

Post by Rotyn »

Kann mir dabei jemand helfen...oder ist das zu umfangreich?
Testing & Productive: OTRS::ITSM 3.3.5 on CentOS 6.5 and MySQL
Packages: All included
Alexander Halle
Znuny expert
Posts: 296
Joined: 04 Jul 2010, 17:49
Znuny Version: 3.1.x
Real Name: Alexander Halle
Company: radprax MVZ GmbH
Location: Wuppertal
Contact:

Re: Customer Company: neues Feld (Dropdown)

Post by Alexander Halle »

Rotyn wrote:Kann mir dabei jemand helfen...oder ist das zu umfangreich?
Wahrscheinlich schon. Bitte stell die Frage Mal neu im Developers-Subforum, dafür ist es ja da :) Und vielleicht etwas ausführlicher schreiben, wie weit du bisher bist mit Angabe von Dateinamen und ggf. Codezeile. Und schau auch Mal durch die alten Threads und die Howtos-Subforen, da habe ich schon viel gelernt bezüglich Eigenentwicklung.
Alexander Halle System: OTRS 3.1.x, Ubuntu 10.04.x LTS, MySQL 5.1.x, Apache 2.2.x
OTRS Community Links: User Meetings, Projects
Rotyn
Znuny newbie
Posts: 68
Joined: 21 Aug 2012, 17:11
Znuny Version: 3.3.5
Real Name: Rudy

Re: Customer Company: neues Feld (Dropdown)

Post by Rotyn »

OK, wird gemacht
Testing & Productive: OTRS::ITSM 3.3.5 on CentOS 6.5 and MySQL
Packages: All included
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Company: neues Feld (Dropdown) [CLOSED]

Post by crythias »

Rotyn wrote:(a) Ich wuerde dieses Feld gerne als DropDown-Auswahl anbieten.
Ja, genau wie CustomerUser, können Sie mithilfe von Auswahlen.

Code: Select all

            [ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
            [ 'Projecktleiter', 'Projecktleiter', 'projectm', 1, 0, 'var', '', 0],
            [ 'ValidID',                'Valid',   'valid_id', 0, 1, 'int', '', 0 ],
        ],
        Selections => {
            Projektleiter => {
                'a' => 'Item A',
                'b' => 'Item B',
            },
        },
Relevanten code:

Code: Select all

    for my $Entry ( @{ $Self->{ConfigObject}->Get('CustomerCompany')->{Map} } ) {
        if ( $Entry->[0] ) {
            my $Block = 'Input';

            # build selections or input fields
            if ( $Self->{ConfigObject}->Get('CustomerCompany')->{Selections}->{ $Entry->[0] } ) {
                my $OptionRequired = '';
                if ( $Entry->[4] ) {
                    $OptionRequired = 'Validate_Required';
                }
(b) Nein, nicht so wie sie denken, Sie könnten aber sie versuchen, einen Blick auf diesen Code, um das Feld zu füllen.
Ich spreche nicht Deutsch, einfach den Code.
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
Post Reply