Ticket Creation is too slow if i use many dynamic fields

English! place to talk about development, programming and coding
Post Reply
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Ticket Creation is too slow if i use many dynamic fields

Post by williamrobert1983 »

Hi ,

I have created about more then 50 dynamic fields in AgentTicketEmail module for some purpose. I filled the values in all dynamic field and created ticket.

But, it will take long time to create ticket ( around 20 sec ) . How we can make it faster to create ticket ?

Please advice me :)

Thanks lot.

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

Re: Ticket Creation is too slow if i use many dynamic fields

Post by crythias »

Don't do that ...

Besides, if you have 50 possible fields to fill out just to create a ticket, you're probably making life a bit too hard for your users.

You can edit the DTL template to not refresh dynamic fields.
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
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: Ticket Creation is too slow if i use many dynamic fields

Post by williamrobert1983 »

How to edit the DTL template to not refresh dynamic fields?

give me some sample.. i am using AgentTicketEmail.dtl file.

thanks,

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

Re: Ticket Creation is too slow if i use many dynamic fields

Post by crythias »

For each field that updates ajax-wise, you'll see something like this:
$('#ServiceID').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewEmailTicket'), 'AJAXUpdate', 'ServiceID', ['TypeID', 'Dest', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' $Data{"DynamicFieldNamesStrg"}]);

These affect dynamic fields when that specific field is checked.

unfortunately, it's not so easy with dynamic fields themselves:

Code: Select all

<!-- dtl:block:DynamicField -->
                    <div class="Row Row_DynamicField_$QData{"Name"}">
                        $Data{"Label"}
                        <div class="Field">
                            $Data{"Field"}
                        </div>
                        <div class="Clear"></div>
                    </div>
<!-- dtl:block:DynamicField -->
This is provisioned from Kernel/Modules/AgentTicketEmail.dtl (and others likeit)

Code: Select all

                $DynamicFieldHTML{ $DynamicFieldConfig->{Name} } =
                    $Self->{BackendObject}->EditFieldRender(
                    DynamicFieldConfig   => $DynamicFieldConfig,
                    PossibleValuesFilter => $PossibleValuesFilter,
                    Value                => $Value,
                    Mandatory =>
                        $Self->{Config}->{DynamicField}->{ $DynamicFieldConfig->{Name} } == 2,
                    LayoutObject    => $Self->{LayoutObject},
                    ParamObject     => $Self->{ParamObject},
                    AJAXUpdate      => 1, #update field on change?
                    UpdatableFields => $Self->_GetFieldsToUpdate(), #which fields to update?
                    );
which, theoretically means you could comment at least the last two keys.

Note that if you do this, you can't use dynamic fields with ACLs, including dependent dynamic fields.
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
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: Ticket Creation is too slow if i use many dynamic fields

Post by williamrobert1983 »

Ok. Thanks crythias.. i will check it..


William
Post Reply