CoreBOSBB
My Update Field task clears a date field ONLY on development install - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18)
+--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4)
+--- Thread: My Update Field task clears a date field ONLY on development install (/showthread.php?tid=1458)



My Update Field task clears a date field ONLY on development install - Guido1982 - 04-04-2019

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.


RE: My Update Field task clears a date field ONLY on development install - joebordes - 04-04-2019

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


RE: My Update Field task clears a date field ONLY on development install - Guido1982 - 04-04-2019

You mean the createdtime field from the asset? The workflow lives on the Asset


RE: My Update Field task clears a date field ONLY on development install - joebordes - 04-05-2019

no, createdtime from the SO


RE: My Update Field task clears a date field ONLY on development install - Guido1982 - 04-08-2019

You mean try losing the format_date function?


RE: My Update Field task clears a date field ONLY on development install - Guido1982 - 04-08-2019

Hmm, I noticed it's also happening in my production environment as well.


RE: My Update Field task clears a date field ONLY on development install - joebordes - 04-08-2019

(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


RE: My Update Field task clears a date field ONLY on development install - Guido1982 - 04-09-2019

Let me check that and get back to you