[Vtigercrm-commits] [Vtiger development] #8641: Migration bug in 540_to_600RC file
Vtiger development
vtiger-tickets at trac.vtiger.com
Fri Oct 16 05:44:45 GMT 2015
#8641: Migration bug in 540_to_600RC file
-----------------------+------------------------
Reporter: uma | Owner: developer
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: vtigercrm | Version: 6.2.0
Severity: Medium | Resolution:
Keywords: |
-----------------------+------------------------
Comment (by uma):
'''Please do use the below code to resolve hard coding issue with
migration script 540_to_600RC script'''
$calendarEmptyBlockId = getBlockId(getTabid('Calendar'),"");
Migration_Index_View::ExecuteQuery('UPDATE vtiger_blocks SET blocklabel
="LBL_DESCRIPTION_INFORMATION" WHERE blockid =
?',array($calendarEmptyBlockId));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET displaytype=1
WHERE fieldname="location" AND tabid = ?', array(getTabid('Calendar')));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET displaytype=1
WHERE fieldname="visibility" AND tabid = ?', array(getTabid('Events')));
global $adb;
$eventsEmptyBlockIds = "select blockid from vtiger_blocks where tabid=?
and blocklabel = ?";
$result = $adb->pquery($eventsEmptyBlockIds, array(getTabid('Events'),
""));
$noofrows = $adb->num_rows($result);
$eventBlockId = getBlockId($eventTabId, 'LBL_EVENT_INFORMATION');
if($noofrows > 1){
for ($i = 0; $i < $noofrows; $i++) {
$blockId = $adb->query_result($result, $i, 'blockid');
Migration_Index_View::ExecuteQuery('UPDATE vtiger_blocks SET
blocklabel = "LBL_REMINDER_INFORMATION", show_title = 0 WHERE blockid =
?',array($blockId));
if($i == 1){
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET
block = ? WHERE block = ?', array($eventBlockId, $blockId));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_blocks SET
blocklabel = "LBL_DESCRIPTION_INFORMATION", show_title = 0 WHERE blockid =
?',array($blockId));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET
block = ? WHERE fieldname = "description" AND tabid = ?',array($blockId,
getTabid('Events')));
}
}
}
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET block = ?
WHERE fieldname = "contact_id" AND tabid = ?', array($eventBlockId,
getTabid('Events')));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET displaytype =
3 WHERE fieldname = ? AND tabid = ?', array('notime',
getTabid('Events')));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET displaytype =
3 WHERE fieldname = ? AND tabid = ?', array('duration_hours',
getTabid('Events')));
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8641#comment:5>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list