[Vtigercrm-developers] Relate products to HelpDesk error

Manuel Fernando ptdesigner at gmail.com
Fri Feb 15 12:16:55 GMT 2019


Hello all. 

I’m trying some luck here because I don’t think in track will get any review of the bug

Bad Relation products if to helpdesk vt 6.5
Steps to reproduce:

1- Manual relate Products to Tickets

<?php
ini_set('display_errors','on'); error_reporting(E_ALL); // STRICT DEVELOPMENT
// Turn on debugging level
$Vtiger_Utils_Log = true;

// Include necessary classes
include_once 'vtlib/Vtiger/Module.php';

$moduleInstance = Vtiger_Module::getInstance('HelpDesk');
if ($moduleInstance) {
    $productsModule = Vtiger_Module::getInstance('Products');
    $relationLabel = 'Products';
    $moduleInstance->setRelatedList($productsModule, $relationLabel, Array('ADD', 'SELECT'), 'get_related_list');
}
2 - Create new product and go to Tickets and select that product, all ok without customizations.

3 - Go to Products Edit Fields and add new custom field - set that field to Summary View.

4 - Go to Ticket and related products and you will see an empty related products list with this error: Unknown column 'vtiger_productcf.cf_772' in 'field list'

(in order to get this info must set PearDatabase.php $dieOnError = true;)

Query Failed:SELECT DISTINCT vtiger_crmentity.crmid,vtiger_products.productname, vtiger_products.productcode, vtiger_productcf.cf_772, vtiger_products.unit_price, vtiger_products.commissionrate, vtiger_products.qty_per_unit FROM vtiger_products INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid INNER JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid = vtiger_crmentity.crmid OR vtiger_crmentityrel.crmid = vtiger_crmentity.crmid) LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid WHERE vtiger_crmentity.deleted = 0 AND (vtiger_crmentityrel.crmid = 5 OR vtiger_crmentityrel.relcrmid = 5) LIMIT 0,20::ADODB error Query Failed:SELECT DISTINCT vtiger_crmentity.crmid,vtiger_products.productname, vtiger_products.productcode, vtiger_productcf.cf_772, vtiger_products.unit_price, vtiger_products.commissionrate, vtiger_products.qty_per_unit FROM vtiger_products INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid INNER JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid = vtiger_crmentity.crmid OR vtiger_crmentityrel.crmid = vtiger_crmentity.crmid) LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid WHERE vtiger_crmentity.deleted = 0 AND (vtiger_crmentityrel.crmid = 5 OR vtiger_crmentityrel.relcrmid = 5) LIMIT 0,20::->Unknown column 'vtiger_productcf.cf_772' in 'field list'


Best Regards.

Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190215/1a74f68f/attachment.html>


More information about the vtigercrm-developers mailing list