[Vtigercrm-developers] vt61 - ModTracker Summary Widget: 44 Years!

Alan Lord alanslists at gmail.com
Fri Oct 10 09:30:36 GMT 2014


On 09/10/14 18:28, Rishab K wrote:
> Alan,
> This is because in ModTrackerHandler.php we check for 'modifiedtime' as
> fieldname
> and updating the Status in vtiger_modtracker_basic
>
> What is the fieldname of modifiedtime and createdtime within
> vtiger_field for the given module

Odd.

In my bootstrap for the module I have the code below (this is the same 
code as another custom module I've created for this system where the 
History widget does work...).

In vtiger_crmentity the modifiedtime is being populated/updated of a 
particular crmid. Yet in modtracker_basic the changedon column for the 
same crmid is full of NULL and the status column is 0. On my other 
custom module the changedon has a datetime value and the status column 
has 4 in it.

Also see at the end of this email a snapshot from the logs. You can 
clearly see that the changedon is not being populated.

Any other ideas?

Cheers

Al


> $field = Vtiger_Field::getInstance('CreatedTime', $module);
> if ($field != false) {
> 	$field->delete();
> }
> $field = new Vtiger_Field();
> $field->name = 'CreatedTime';
> $field->label = 'Created Time';
> $field->table = 'vtiger_crmentity';
> $field->column = 'createdtime';
> $field->uitype = 70;
> $field->typeofdata = 'T~O';
> $field->displaytype = 2;
> $block_main->addField($field);
> unset($field);
>
> $field = Vtiger_Field::getInstance('ModifiedTime', $module);
> if ($field != false) {
> 	$field->delete();
> }
> $field = new Vtiger_Field();
> $field->name = 'ModifiedTime';
> $field->label = 'Modified Time';
> $field->table = 'vtiger_crmentity';
> $field->column = 'modifiedtime';
> $field->uitype = 70;
> $field->typeofdata = 'T~O';
> $field->displaytype = 2;
> $block_main->addField($field);
> unset($field);

> Fri Oct 10 09:24:17 2014,476 [25528] DEBUG VT - Prepared sql query being executed : UPDATE vtiger_crmentity SET label=? WHERE crmid=?
> Fri Oct 10 09:24:17 2014,476 [25528] DEBUG VT - Prepared sql query parameters : [TD1724,7204]
> Fri Oct 10 09:24:17 2014,596 [25528] DEBUG VT - Prepared sql query being executed : SELECT * FROM vtiger_modtracker_tabs WHERE vtiger_modtracker_tabs.visible = 1
>                                                                    AND vtiger_modtracker_tabs.tabid=?
> Fri Oct 10 09:24:17 2014,596 [25528] DEBUG VT - Prepared sql query parameters : [51]
> Fri Oct 10 09:24:17 2014,596 [25528] DEBUG VT - Entering getColumnFields(LSTourDetails) method ...
> Fri Oct 10 09:24:17 2014,597 [25528] DEBUG VT - in getColumnFields LSTourDetails
> Fri Oct 10 09:24:17 2014,597 [25528] DEBUG VT - Exiting getColumnFields method ...
> Fri Oct 10 09:24:17 2014,598 [25528] INFO VT - PearDatabase ->ADODB disconnect
> Fri Oct 10 09:24:17 2014,598 [25528] DEBUG VT - Prepared sql query being executed : SELECT libertus_lstourdetailscf.cf_962 AS libertus_lstourdetailscfcf_962,libertus_lstourdetailscf.cf_964 AS libertus_lstourdetailscfcf_964,libertus_lstourdetailscf.cf_966 AS libertus_lstourdetailscfcf_966,libertus_lstourdetailscf.cf_974 AS libertus_lstourdetailscfcf_974,libertus_lstourdetails.tourdetailsno AS libertus_lstourdetailstourdetailsno,libertus_lstourdetails.lstd_type AS libertus_lstourdetailslstd_type,libertus_lstourdetails.resortid AS libertus_lstourdetailsresortid,libertus_lstourdetails.lstourfamiliesid AS libertus_lstourdetailslstourfamiliesid,libertus_lstourdetails.contactid AS libertus_lstourdetailscontactid,libertus_lstourdetails.datebooked AS libertus_lstourdetailsdatebooked,libertus_lstourdetails.lstd_pkgstatus AS libertus_lstourdetailslstd_pkgstatus,libertus_lstourdetails.giftvalue AS libertus_lstourdetailsgiftvalue,libertus_lstourdetails.description AS libertus_lstourdetailsdescri
ption,libertus_lstourdetails.depositamnt AS libertus_lstourdetailsdepositamnt,libertus_lstourdetails.lstd_dep_code AS libertus_lstourdetailslstd_dep_code,libertus_lstourdetails.depositrecvd AS libertus_lstourdetailsdepositrecvd,libertus_lstourdetails.lstd_dep_paymethod AS libertus_lstourdetailslstd_dep_paymethod,libertus_lstourdetails.packageamnt AS libertus_lstourdetailspackageamnt,libertus_lstourdetails.packagerecvd AS libertus_lstourdetailspackagerecvd,libertus_lstourdetails.lstd_pkg_paymethod AS libertus_lstourdetailslstd_pkg_paymethod,libertus_lstourdetails.hotelid AS libertus_lstourdetailshotelid,libertus_lstourdetails.confnum AS libertus_lstourdetailsconfnum,libertus_lstourdetails.checkin AS libertus_lstourdetailscheckin,libertus_lstourdetails.checkout AS libertus_lstourdetailscheckout,libertus_lstourdetails.lstd_roomtype AS libertus_lstourdetailslstd_roomtype,libertus_lstourdetails.adults AS libertus_lstourdetailsadults,libertus_lstourdetails.children AS libertus_lstourdetails
children,libertus_lstourdetails.addnghts AS libertus_lstourdetailsaddnghts,libertus_lstourdetails.tourdate AS libertus_lstourdetailstourdate,libertus_lstourdetails.tourtime AS libertus_lstourdetailstourtime,libertus_lstourdetails.tourconfirmed AS libertus_lstourdetailstourconfirmed,libertus_lstourdetails.lstd_status AS libertus_lstourdetailslstd_status,vtiger_crmentity.smownerid AS vtiger_crmentityassigned_user_id,vtiger_crmentity.createdtime AS vtiger_crmentitycreatedtime,vtiger_crmentity.modifiedtime AS vtiger_crmentitymodifiedtime,libertus_lstourdetails.description AS libertus_lstourdetailsdescription,libertus_lstourdetailscf.cf_974 AS libertus_lstourdetailscfcf_974,libertus_lstourdetailscf.cf_962 AS libertus_lstourdetailscfcf_962,libertus_lstourdetailscf.cf_964 AS libertus_lstourdetailscfcf_964,libertus_lstourdetailscf.cf_966 AS libertus_lstourdetailscfcf_966,libertus_lstourdetails.tourdetailsno AS libertus_lstourdetailstourdetailsno,libertus_lstourdetails.lstd_type AS libertus_ls
tourdetailslstd_type,libertus_lstourdetails.resortid AS libertus_lstourdetailsresortid,libertus_lstourdetails.lstourfamiliesid AS libertus_lstourdetailslstourfamiliesid,libertus_lstourdetails.contactid AS libertus_lstourdetailscontactid,libertus_lstourdetails.datebooked AS libertus_lstourdetailsdatebooked,libertus_lstourdetails.lstd_pkgstatus AS libertus_lstourdetailslstd_pkgstatus,libertus_lstourdetails.giftvalue AS libertus_lstourdetailsgiftvalue,vtiger_crmentity.smownerid AS vtiger_crmentityassigned_user_id,vtiger_crmentity.createdtime AS vtiger_crmentitycreatedtime,vtiger_crmentity.modifiedtime AS vtiger_crmentitymodifiedtime,libertus_lstourdetails.tourdate AS libertus_lstourdetailstourdate,libertus_lstourdetails.tourtime AS libertus_lstourdetailstourtime,libertus_lstourdetails.tourconfirmed AS libertus_lstourdetailstourconfirmed,libertus_lstourdetails.depositamnt AS libertus_lstourdetailsdepositamnt,libertus_lstourdetails.lstd_dep_code AS libertus_lstourdetailslstd_dep_code,liber
tus_lstourdetails.depositrecvd AS libertus_lstourdetailsdepositrecvd,libertus_lstourdetails.lstd_dep_paymethod AS libertus_lstourdetailslstd_dep_paymethod,libertus_lstourdetails.packageamnt AS libertus_lstourdetailspackageamnt,libertus_lstourdetails.packagerecvd AS libertus_lstourdetailspackagerecvd,libertus_lstourdetails.lstd_pkg_paymethod AS libertus_lstourdetailslstd_pkg_paymethod,libertus_lstourdetails.hotelid AS libertus_lstourdetailshotelid,libertus_lstourdetails.confnum AS libertus_lstourdetailsconfnum,libertus_lstourdetails.checkin AS libertus_lstourdetailscheckin,libertus_lstourdetails.checkout AS libertus_lstourdetailscheckout,libertus_lstourdetails.lstd_roomtype AS libertus_lstourdetailslstd_roomtype,libertus_lstourdetails.adults AS libertus_lstourdetailsadults,libertus_lstourdetails.children AS libertus_lstourdetailschildren,libertus_lstourdetails.addnghts AS libertus_lstourdetailsaddnghts,libertus_lstourdetails.lstd_status AS libertus_lstourdetailslstd_status,vtiger_crmen
tity.deleted FROM  vtiger_crmentity LEFT JOIN libertus_lstourdetails ON libertus_lstourdetails.lstourdetailsid=vtiger_crmentity.crmid LEFT JOIN libertus_lstourdetailscf ON libertus_lstourdetailscf.lstourdetailsid=vtiger_crmentity.crmid WHERE  vtiger_crmentity.crmid=?  LIMIT 1
> Fri Oct 10 09:24:17 2014,599 [25528] DEBUG VT - Prepared sql query parameters : [7204]
> Fri Oct 10 09:24:17 2014,601 [25528] DEBUG VT - Prepared sql query being executed : SELECT * FROM vtiger_modtracker_basic WHERE
>                                     crmid = ?
> Fri Oct 10 09:24:17 2014,601 [25528] DEBUG VT - Prepared sql query parameters : [7204]
> Fri Oct 10 09:24:17 2014,658 [25528] DEBUG VT - Prepared sql query being executed : INSERT INTO vtiger_modtracker_basic(id, crmid, module, whodid, changedon, status)
>                                             VALUES(?,?,?,?,?,?)
> Fri Oct 10 09:24:17 2014,658 [25528] DEBUG VT - Prepared sql query parameters : [198,7204,LSTourDetails,1,,0]
> Fri Oct 10 09:24:17 2014,708 [25528] DEBUG VT - Prepared sql query being executed : INSERT INTO vtiger_modtracker_detail(id,fieldname,prevalue,postvalue) VALUES(?,?,?,?)
> Fri Oct 10 09:24:17 2014,708 [25528] DEBUG VT - Prepared sql query parameters : [198,lstd_pkgstatus,Open,Activated]
> Fri Oct 10 09:24:17 2014,758 [25528] DEBUG VT - Prepared sql query being executed : INSERT INTO vtiger_modtracker_detail(id,fieldname,prevalue,postvalue) VALUES(?,?,?,?)
> Fri Oct 10 09:24:17 2014,758 [25528] DEBUG VT - Prepared sql query parameters : [198,ModifiedTime,2014-10-10 08:55:09,2014-10-10 09:24:16]
> Fri Oct 10 09:24:17 2014,809 [25528] DEBUG VT - Prepared sql query being executed : SELECT crmid, setype, label FROM vtiger_crmentity WHERE crmid=?





More information about the vtigercrm-developers mailing list