Body nicht als Pflichtfeld [SOLVED]

Hilfe zu Znuny Problemen aller Art
Locked
michael_maurer
Znuny advanced
Posts: 146
Joined: 07 Aug 2008, 09:20
Znuny Version: 2.4.9
Contact:

Body nicht als Pflichtfeld [SOLVED]

Post by michael_maurer »

Hallo zusammen,

ich hätte gerne den Body z.B. beim Besitzerwechsel nicht mehr als Pflichtfeld konfiguriert.
Hat jemand ne Idee, wie ich das realisieren kann?

Danke im Voraus!

mfg
Michael
Last edited by michael_maurer on 27 Apr 2010, 11:09, edited 1 time in total.
Wer Deutsch sät, wird Verständnis ernten!

Prod & Test jeweils:
OTRS 2.4.9
OTRS ITSM 2.1.1
MySQL
Apache
SLES11 SP0
ddDagobert
Znuny wizard
Posts: 350
Joined: 13 May 2009, 14:24
Znuny Version: 5.0.10

Re: Body nicht als Pflichtfeld

Post by ddDagobert »

Servus,

wir haben den Body-Wert in der Sysconfig für die einzelnen Masken einfach vorbelegt (z.B. mit "Kommentar:").
Konfigurationsmäßig ist mir nicht bekannt, dass man das "Pflichtfeld" ausschalten kann. Da müsste man wahrscheinlich an das Modul...
Produktiv: OTRS 5.0.10 mit ITSM + Individualpakete und Feature AddOn auf SLES 11 SP2 mit PosgtreSQL 9.3
Test: OTRS 5.0.10 mit ITSM + Individualpakete und Feature AddOn auf SLES 11 SP2 mit PosgtreSQL 9.3
Entwicklung: OTRS 5.0.10 mit ITSM + Individualpakete und Feature AddOn auf SLES 11 SP2 mit PosgtreSQL 9.3
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Body nicht als Pflichtfeld

Post by Daniel Obee »

Du könntest in der /Kernel/Output/HTML/Standard/AgentTicketOwner.dtl die Zeilen 32-41 mit der Abfrage auskommentieren:

Code: Select all

    else if (document.compose.Body.value == "") {
        alert('$JSText{"A message should have a body!"}');
        if (typeof RichTextUpdateLinkedField == 'function') {
            RichTextFocus();
        }
        else {
            document.compose.Body.focus();
        }
        return false;
    }
Hab's jetzt nicht ausprobiert, sollte aber kein Thema sein.

Gruß
Daniel
michael_maurer
Znuny advanced
Posts: 146
Joined: 07 Aug 2008, 09:20
Znuny Version: 2.4.9
Contact:

Re: Body nicht als Pflichtfeld

Post by michael_maurer »

Hi Daniel,

das hatte ich schon versucht. Nur das Auskommentieren der folgenden Zeilen der AgentTicketOwner.dtl hilft nicht.

Code: Select all

    else if (document.compose.Body.value == "") {
        alert('$JSText{"A message should have a body!"}');
        if (typeof RichTextUpdateLinkedField == 'function') {
            RichTextFocus();
        }
        else {
            document.compose.Body.focus();
        }
        return false;
    }
Zusätzlich hatte ich in der AgentTicketOwner auch noch diese Zeilen erfolglos auskommentiert.

Code: Select all

<!-- dtl:block:RichText -->
                                            <textarea id="RichText" name="Body" rows="16" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$QData{"Body"}</textarea>
                                         <font color="red" size="-2">$Text{"$Data{"Body invalid"}"}</font>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
Scheint, als wären das nur Hinweise - Die eigentliche Prüfung auf Inhalt im Body erfolgt wohl ganz wo anders

mfg
Michael
Wer Deutsch sät, wird Verständnis ernten!

Prod & Test jeweils:
OTRS 2.4.9
OTRS ITSM 2.1.1
MySQL
Apache
SLES11 SP0
Daniel Obee
Moderator
Posts: 644
Joined: 19 Jun 2007, 17:11
Znuny Version: various
Real Name: Daniel Obée
Location: Berlin

Re: Body nicht als Pflichtfeld

Post by Daniel Obee »

Stimmt. Du musst zusätzlich in der \Kernel\Modules\AgentTicketOwner.pm noch den Check auskommentieren (Zeile 288 bis 291):

Code: Select all

#           # check body
#            if ( !$GetParam{Body} ) {
#                $Error{'Body invalid'} = '* invalid';
#            }
Dann funzts.

Gruß
Daniel
michael_maurer
Znuny advanced
Posts: 146
Joined: 07 Aug 2008, 09:20
Znuny Version: 2.4.9
Contact:

Re: Body nicht als Pflichtfeld

Post by michael_maurer »

Hi Daniel,

danke - nun funktionierts.

Zusammenfassung der auszukommentierenden Stellen:
\Kernel\Modules\AgentTicketOwner.pm

Code: Select all

#           # check body
#            if ( !$GetParam{Body} ) {
#                $Error{'Body invalid'} = '* invalid';
#            }
/opt/otrs/Kernel/Output/HTML/*Theme*/AgentTicketOwner.dtl

Code: Select all

   //else if (document.compose.Body.value == "") {
    //   alert('$JSText{"A message should have a body!"}');
    //   if (typeof RichTextUpdateLinkedField == 'function') {
    //       RichTextFocus();
    //   }
und

Code: Select all

<!--                                         <font color="red" size="-2">$Text{"$Data{"Body invalid"}"}</font>-->
mfg
Michael
Wer Deutsch sät, wird Verständnis ernten!

Prod & Test jeweils:
OTRS 2.4.9
OTRS ITSM 2.1.1
MySQL
Apache
SLES11 SP0
Schojo
Znuny expert
Posts: 181
Joined: 03 Jul 2007, 11:53
Znuny Version: 6.0.30
Real Name: Matthias
Location: /opt/otrs/

Re: Body nicht als Pflichtfeld [SOLVED]

Post by Schojo »

Mit welcher Version habt ihr das gemacht? Habe gerade die Zusammenfassung durchgeführt und bekomme Ihn hier :/
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.14 (Ubuntu) Server at FQDN Port 80
Liegt an dem Part hier. Sobald ich den wieder reinnehme gehts...

Code: Select all

#           # check body
#            if ( !$GetParam{Body} ) {
#                $Error{'Body invalid'} = '* invalid';
#            }
produktiv_vm: OTRS 6.0.30 - ubuntu Server 18.04.5 LTS - mysql-server 5.7.33
tdeklein
Znuny newbie
Posts: 33
Joined: 06 Sep 2010, 10:09
Znuny Version: 3.0.6

Re: Body nicht als Pflichtfeld [SOLVED]

Post by tdeklein »

Hi,

zumindest in 3.x geht das vorbelegen des Body/Subject sehr einfach über SysConfig in Ticket -> Frontend::Agent::Ticket::View* ohne Änderungen am Code.
http://forums.otrs.org/viewtopic.php?f=62&t=7349


Gruß
Thomas
OTRS 3.0.8
Debian 6.0
MySQL
KundenDB aus postgres angebunden.
Schojo
Znuny expert
Posts: 181
Joined: 03 Jul 2007, 11:53
Znuny Version: 6.0.30
Real Name: Matthias
Location: /opt/otrs/

Re: Body nicht als Pflichtfeld [SOLVED]

Post by Schojo »

Ja, habs jetzt auch einfach vorbelegt...alles andere ist zuviel Fummelei :D
produktiv_vm: OTRS 6.0.30 - ubuntu Server 18.04.5 LTS - mysql-server 5.7.33
Locked