Skip to content
Snippets Groups Projects
Commit be1dc7f9 authored by Manuel's avatar Manuel
Browse files

fix #557 #558 references to sla and cases

parent 714f7af0
No related branches found
No related tags found
No related merge requests found
......@@ -497,7 +497,7 @@ class ListViewController {
if(!empty($value) && !empty($this->nameList[$fieldName]) && !empty($parentModule)) {
$parentMeta = $this->queryGenerator->getMeta($parentModule);
$value = textlength_check($this->nameList[$fieldName][$value]);
if ($parentMeta->isModuleEntity() && $parentModule != "Users" && $parentModule != 'SLA') {
if ($parentMeta->isModuleEntity() && $parentModule != "Users") {
$value = "<a class='js-reference-display-value' href='?module=$parentModule&view=Detail&".
"record=$rawValue' title='".getTranslatedString($parentModule, $parentModule)."'>$value</a>";
}
......
......@@ -21,23 +21,6 @@ class Contacts_RelationAjax_Action extends Vtiger_RelationAjax_Action {
$autoFillFieldName = $data['fieldname'];
$autofillRecordId = $recordModel->get($autoFillFieldName);
//added to handle extra relation for cases sla
if ($autoFillFieldName == 'slaid') {
//if contact doesn't have related sla then fetch contact related sla
if (!$autofillRecordId) {
$account_id = $recordModel->get('account_id');
if ($account_id) {
$accountsRecordModel = Vtiger_Record_Model::getInstanceById($account_id, 'Accounts');
$autofillRecordId = $accountsRecordModel->get($autoFillFieldName);
}
//if organization doesn't have related sla get default sla
if (!$autofillRecordId) {
include_once 'modules/Settings/SLA/models/Record.php';
$autofillRecordId = Settings_SLA_Record_Model::getDefaultSLA();
}
}
}
$autoFillNameArray = getEntityName($autoFillModule, $autofillRecordId);
$autoFillName = $autoFillNameArray[$autofillRecordId];
......
......@@ -84,7 +84,7 @@ class Vtiger_ExportData_Action extends Vtiger_Mass_Action {
}
function getAdditionalQueryModules(){
return array_merge(getInventoryModules(), array('Products', 'Services', 'PriceBooks', 'Cases'));
return array_merge(getInventoryModules(), array('Products', 'Services', 'PriceBooks'));
}
/**
......
......@@ -168,12 +168,6 @@ class VTCreateEntityTask extends VTTask {
$fieldValue = $recordId;
} else {
$fieldValue = '';
if ($fieldReferenceModule == 'SLA') {
$slaDefaultId = Settings_SLA_Record_Model::getDefaultSLA();
if (!empty($slaDefaultId)) {
$fieldValue = $slaDefaultId;
}
}
}
}
}
......
......@@ -36,13 +36,6 @@ class ModComments_SaveAjax_Action extends Vtiger_SaveAjax_Action {
$result['id'] = $result['_recordId'] = $recordModel->getId();
$result['_recordLabel'] = $recordModel->getName();
if($request->get('source_module') == 'Cases'){
$caseRecordModel = Vtiger_Record_Model::getInstanceById($request->get('related_to'));
//Notify to other users, who are there in detail view of the same record
$caseRecordModel->notifyToUser($userId);
//
}
$response = new Vtiger_Response();
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
$response->setResult($result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment