Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My Update Field task clears a date field ONLY on development install
#1
I have some weird error:

I have created a reference UI10 field on the assets module that references SalesOrders. Every time an asset is saved, it looks for the reference field to see if a salesorder is selected by a condition that simply checks the related SalesOrder for a subject line (when no SalesOrder is selected, the subject line will be empty). If a SalesOrder is selected as related to the Asset, the 'date sold' of the Asset is overwritten by the createdtime of the SalesOrder with an 'Update Field' Workflow task:
Code:
format_date($(assets_related_soid : (SalesOrder) createdtime) ,'d-m-Y')

This is used to enforce the Asset's date sold when linked to a SalesOrder and works fine on a production server. Now I've cloned the installation to my local PC, an Ubuntu PC with a regular LAMP stack installed and here I notice that the Workflow task clears the 'date sold' field. I've check the logs:

PHP Code:
2019-04-04T09:09:41+00:00 DEBUG index getValidDBInsertDateValue 
2019
-04-04T09:09:41+00:00 DEBUG index get_column_value datesold, , datesold5D
2019
-04-04T09:09:41+00:00 DEBUG index getValidDBInsertDateValue 01-01-1900
2019
-04-04T09:09:41+00:00 DEBUG index getValidDBInsertDateValue
2019
-04-04T09:09:41+00:00 DEBUG index pquery update vtiger_assets set product=?,serialnumber=?,datesold=?,dateinservice=?,assetstatus=?,assetname=?,account=?,assets_related_soid=? where assetsid=?
2019-04-04T09:09:41+00:00 DEBUG index pquery parameters [3241,ASSETSERIAL,,1900-01-01,In Gebruik,Platenbank,264068,264174,267814

Don't mind the specifics, the important thing is the empty value after 'ASSETSERIAL'. Again this only happens on my local copy, not on the production server.
Reply
#2
it is probably the format_date, as the result of that should be in the user format (I suppose). Try just using directly the createdtime field
Joe
TSolucio
Reply
#3
You mean the createdtime field from the asset? The workflow lives on the Asset
Reply
#4
no, createdtime from the SO
Joe
TSolucio
Reply
#5
You mean try losing the format_date function?
Reply
#6
Hmm, I noticed it's also happening in my production environment as well.
Reply
#7
(04-08-2019, 09:17 AM)Guido1982 Wrote: You mean try losing the format_date function?

yes, that is the first thing I would try
Joe
TSolucio
Reply
#8
Let me check that and get back to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)