Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Activity update doesn't register changes
#1
Hi All!

Since this update in the file DART.php (specifically the cahges in line 115): https://github.com/tsolucio/DART/commit/768d0eb080c90e8c90950009d9e3ab097de4c54f#diff-79aaf1f21d5dcda3e6dcee5da0c08f5aaf6f39aceaf19dfd91831188f81c72cb
I can't see the resume with all the changes made during the day (also the e-mail is send but empty). The previous version works just fine.
Reply
#2
we need to see the SQL and run it directly in MySQL to see what it is returning.

activate logging at FATAL level and add this line of code before line 115

PHP Code:
global $log;
$log->fatal("SELECT $selectcolumn, modifiedby as modifier, smownerid as owner, module, createdtime!=modifiedtime as haschanged
FROM 
$table
INNER JOIN vtiger_dart_recordchanges ON 
$table.$idcolumn = vtiger_dart_recordchanges.crmid AND modifiedon=?
INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid=vtiger_dart_recordchanges.crmid"
); 


that should write the SQL into the logs/corebosxxx.log file. Run it directly in MySQL and share the SQL and the result.
Joe
TSolucio
Reply
#3
Code:
SELECT extintores_no as title, extintoresid as id, modifiedby as modifier, smownerid as owner, module, createdtime!=modifiedtime as haschanged
FROM vtiger_extintores
INNER JOIN vtiger_dart_recordchanges ON vtiger_extintores.extintoresid = vtiger_dart_recordchanges.crmid AND modifiedon='2021-12-09'
INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid=vtiger_dart_recordchanges.crmid


Executing the previous code in MySQL gives the following errors:

#1052 - column: 'modifiedby' in field list is ambiguous 
#1052 - column: 'smownerid' in field list is ambiguous 

As suggested appending  "vtiger_crmentity." to both of them (vtiger_crmentity.modifiedby & vtiger_crmentity.smownerid) solved the error.
Reply
#4
I added the fix to the repository https://github.com/tsolucio/DART/commit/89e3433052e28edf39c6dc1bef9b4b16ead64a7f

Thanks!!
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)