Problem with dynamic value from ext source after addon

Moderator: crythias

Locked
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Problem with dynamic value from ext source after addon

Post by Gunjan »

Hi,

I am using OTRS 3.3.x and I created a dynamic field which takes value from external data source. So everything was working fine until I installed a add on 'OTRSTicketMaskExtension'! After installing this add on, the value comes in the dynamic field but after a second disappears. I tried to find the problem but could not find. Actually all the jquery/ javascript code related to dynamic field is in AgentTicketPhone.dtl/AgentTicketEmail.dtl file, but This add on does not have this file. It would be really helpful if someone know what the problem is. I would be highly thankful!

Thanks & Regards,
Gunjan
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Problem with dynamic value from ext source after addon

Post by jojo »

It seems that your code for getting the data from an external sources is not able to work with ACLs and reloads in the screen. You can not expect that modules will work after you changed the code..
"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
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: Problem with dynamic value from ext source after addon

Post by Gunjan »

Is there any way to do so?? I mean, my code can work and that add on too.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Problem with dynamic value from ext source after addon

Post by jojo »

as I don't know your code I can not tell. If it is a frontend change, most likely not.
"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
Gunjan
Znuny expert
Posts: 228
Joined: 09 Dec 2013, 06:37
Znuny Version: 3.3.x

Re: Problem with dynamic value from ext source after addon

Post by Gunjan »

Please see the below code written in AgentTicketPhone.dtl and the data is coming from an external file extdata.pl

Code: Select all

<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
var lastValue = '';
$("#FromCustomer").on("focusout",setInterval(function(Event) 
{

	if ($("#CustomerID").val() != lastValue) 
	{	
		
       	lastValue = $("#CustomerID").val();	
			
		$.ajax({
  				type:     'get' ,
  				dataType: 'html' ,   
  				url:   'http://localhost/otrs/extdata.pl' +'?q=' + lastValue ,
  				success: function(html)
				{	
					$("#DynamicField_XYZ")
    					.replaceWith('<select id="DynamicField_XYZ" name="DynamicField_XYZ" class="DynamicFieldText" >' +
          				html +
        				'</select>');
					
  				}
			});
	}
}),500);
//]]></script>
<!--dtl:js_on_document_complete-->
Thanks
Gunjan
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problem with dynamic value from ext source after addon

Post by crythias »

It's not practical for this forum to be able to support third party addons. Talk to the vendor.
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
Locked