Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Moderator: crythias

Locked
smuwanga
Znuny newbie
Posts: 27
Joined: 31 Dec 2014, 10:57
Znuny Version: 5.0.22
Real Name: Simon Peter Muwanga
Company: UgandaSoft
Contact:

Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by smuwanga »

Hello people,

I created dependent dynamic fields, on hitting the Send Email button, I get the error
Create New Email Ticket All fields marked with an asterisk (*) are mandatory.
.

I have filled all the fields that I want to use, unfortunately the error is persistent. Your help will be appreciated.

Regards,
Simon.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by crythias »

smuwanga wrote:I have filled all the fields that I want to use
smuwanga wrote:All fields marked with an asterisk (*) are mandatory.
Apparently what you want and what is displayed are different.
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
smuwanga
Znuny newbie
Posts: 27
Joined: 31 Dec 2014, 10:57
Znuny Version: 5.0.22
Real Name: Simon Peter Muwanga
Company: UgandaSoft
Contact:

Re: Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by smuwanga »

Hello Crythias,

Sorry, that was my mistake.

I have added dependent dynamic fields. On clicking the Send Mail button, the ticket page just refreshes instead of submitting my ticket.
I have looked at the apache logs, show no errors. The access logs are clean as well. I seem to have done something weird. What could that be?


Regards,
Simon.
mavrie
Znuny newbie
Posts: 43
Joined: 02 Sep 2014, 15:04
Znuny Version: 4.0.7
Real Name: Mattias
Company: BusSaP
Location: Belgium

Re: Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by mavrie »

Hello,

Could be kind of obvious, but can you check Ticket::Frontend::AgentTicketEmail###DynamicField in the sysconfig?

"Possible settings: 0 = Disabled, 1 = Enabled, 2 = Enabled and required."

So if you put the dynamic fields as "2", they are mandatory. Changing that to "1" could fix this.

Regards
Otrs 4.0.7 on CentOS 6.5
MySQL Database
smuwanga
Znuny newbie
Posts: 27
Joined: 31 Dec 2014, 10:57
Znuny Version: 5.0.22
Real Name: Simon Peter Muwanga
Company: UgandaSoft
Contact:

Re: Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by smuwanga »

Hi Mavrie,

I did make changes as advised, but the ticket is not created.

On the same AgentEmailTicket.dtl added 5 dynamic fields, and modified the javascript code. I have a GenericAgent job running whose parameters are based on the AgentEmailTicket.dtl dynamic fields therein.

When I remove the javascript code from the dynamic fields, the ticket is successfully created. My gut tells me there is a mishap caused by my javascript. Help will be much appreciated.


Simon.
mavrie
Znuny newbie
Posts: 43
Joined: 02 Sep 2014, 15:04
Znuny Version: 4.0.7
Real Name: Mattias
Company: BusSaP
Location: Belgium

Re: Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by mavrie »

I am nowhere near a Javascript pro, but maybe others on this forum could help with that.

Pasting your code here might help find the issue.

Regards
Otrs 4.0.7 on CentOS 6.5
MySQL Database
smuwanga
Znuny newbie
Posts: 27
Joined: 31 Dec 2014, 10:57
Znuny Version: 5.0.22
Real Name: Simon Peter Muwanga
Company: UgandaSoft
Contact:

Re: Create New Email Ticket All fields marked with an asterisk (*) are mandatory.

Post by smuwanga »

Here is the code. When I remove it from AgentTicketEmail.dtl, the ticket is created. Am afraid the fields no longer become dependent.

Code: Select all

# --- added by simon ----
<!-- dtl:block:DynamicField_customerType -->
                    <div class="Row Row_DynamicField_$QData{"Name"}">
                        $Data{"Label"}
                        <div class="Field">
                            $Data{"Field"}
                        </div>
                        <div class="Clear"></div>
                    </div>
<!-- dtl:block:DynamicField_customerType -->


<!-- dtl:block:DynamicField_serviceType -->
                    <div class="Row Row_DynamicField_$QData{"Name"}">
                        $Data{"Label"}
                        <div class="Field">
                            $Data{"Field"}
                            <!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    function nonetext() {
	    $('#DynamicField_typeOfDataService').parent().addClass( 'Hidden' );
	    $('#LabelDynamicField_typeOfDataService').parent().addClass('Hidden');

            $('#DynamicField_complaintType').parent().addClass( 'Hidden' );
	    $('#LabelDynamicField_complaintType').parent().addClass('Hidden');
    }

    Core.AJAX.FormUpdate($('#NewEmailTicket'), 'AJAXUpdate', 'DynamicField_serviceType', [ 'TypeID', 'Dest', 'NewUserID','NewResponsibleID', 'NextStateID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' $Data{"DynamicFieldNamesStrg"}]);
    
    $('#DynamicField_serviceType').bind('change', function (Event) {
        switch ($('#DynamicField_serviceType').val() ) {
		case "data":
                   nonetext();
                   $('#LabelDynamicField_typeOfDataService').parent().removeClass( 'Hidden' );
                   $('#DynamicField_typeOfDataService').parent().removeClass( 'Hidden' );
		   break;
	   	case "sms":
                   nonetext();
                   $('#LabelDynamicField_complaintType').parent().removeClass( 'Hidden' );
                   $('#DynamicField_complaintType').parent().removeClass( 'Hidden' );
		   break;
	   	default:
		    nonetext();
     }
        

     
    });
//]]></script>
<!--dtl:js_on_document_complete-->
                        </div>
                        <div class="Clear"></div>
                    </div>
<!-- dtl:block:DynamicField_serviceType -->


<!-- dtl:block:DynamicField_typeOfDataService -->
                    <div class="Row Row_DynamicField_$QData{"Name"}">
                        $Data{"Label"}
                        <div class="Field">
                            $Data{"Field"}
                        </div>
                        <div class="Clear"></div>
                    </div>
<!-- dtl:block:DynamicField_typeOfDataService -->

<!-- dtl:block:DynamicField_complaintType -->
                    <div class="Row Row_DynamicField_$QData{"Name"}">
                        $Data{"Label"}
                        <div class="Field">
                            $Data{"Field"}
                        </div>
                        <div class="Clear"></div>
                    </div>
<!-- dtl:block:DynamicField_complaintType -->
Locked