HOR-1768 "Upgrade: No se muestran los casos de la bandeja Unnasigned..." SOLVED
Issue:
Upgrade: No se muestran los casos de la bandeja Unnasigned pero es posible recuperarlos con Jump to
Cause:
Validaciones faltantes en el metodo "workspaceTools::migrateList()"
Solution:
Se mejoran las validaciones en el metodo "workspaceTools::migrateList()"
This commit is contained in:
@@ -2008,50 +2008,60 @@ class workspaceTools
|
|||||||
* @param string $workSpace Workspace
|
* @param string $workSpace Workspace
|
||||||
* @param bool $flagReinsert Flag that specifies the re-insertion
|
* @param bool $flagReinsert Flag that specifies the re-insertion
|
||||||
*
|
*
|
||||||
* return all LIST TABLES with data
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function migrateList($workSpace, $flagReinsert = false, $lang='en')
|
public function migrateList($workSpace, $flagReinsert = false, $lang='en')
|
||||||
{
|
{
|
||||||
$this->initPropel(true);
|
$this->initPropel(true);
|
||||||
|
|
||||||
G::LoadClass("case");
|
$flagListAll = $this->listFirstExecution('check');
|
||||||
|
$flagListUnassigned = $this->listFirstExecution('check', 'unassigned');
|
||||||
|
|
||||||
if (!$flagReinsert && $this->listFirstExecution("check")) {
|
if (!$flagReinsert && $flagListAll && $flagListUnassigned) {
|
||||||
return 1;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$arrayTable1 = ['ListInbox', 'ListMyInbox', 'ListCanceled', 'ListParticipatedLast', 'ListParticipatedHistory', 'ListPaused', 'ListCompleted'];
|
||||||
|
$arrayTable2 = ['ListUnassigned', 'ListUnassignedGroup'];
|
||||||
|
$arrayTable = array_merge($arrayTable1, $arrayTable2);
|
||||||
|
|
||||||
if ($flagReinsert) {
|
if ($flagReinsert) {
|
||||||
//Delete all records
|
//Delete all records
|
||||||
$arrayTable = array("ListInbox", "ListMyInbox", "ListCanceled", "ListParticipatedLast", "ListParticipatedHistory", "ListPaused", "ListCompleted", "ListUnassigned", "ListUnassignedGroup");
|
|
||||||
|
|
||||||
foreach ($arrayTable as $value) {
|
foreach ($arrayTable as $value) {
|
||||||
$tableName = $value . "Peer";
|
$tableName = $value . 'Peer';
|
||||||
$list = new $tableName();
|
$list = new $tableName();
|
||||||
$list->doDeleteAll();
|
$list->doDeleteAll();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$flagReinsert && !$flagListAll) {
|
||||||
|
foreach ($arrayTable1 as $value) {
|
||||||
|
$tableName = $value . 'Peer';
|
||||||
|
$list = new $tableName();
|
||||||
|
|
||||||
|
if ((int)($list->doCount(new Criteria())) > 0) {
|
||||||
|
$flagListAll = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($flagReinsert || !$flagListAll) {
|
||||||
$this->regenerateListCompleted($lang);
|
$this->regenerateListCompleted($lang);
|
||||||
$this->regenerateListCanceled($lang);
|
$this->regenerateListCanceled($lang);
|
||||||
$this->regenerateListMyInbox(); // this list require no translation
|
$this->regenerateListMyInbox(); //This list require no translation
|
||||||
$this->regenerateListInbox(); // this list require no translation
|
$this->regenerateListInbox(); //This list require no translation
|
||||||
$this->regenerateListParticipatedHistory(); // this list require no translation
|
$this->regenerateListParticipatedHistory(); //This list require no translation
|
||||||
$this->regenerateListParticipatedLast(); // this list require no translation
|
$this->regenerateListParticipatedLast(); //This list require no translation
|
||||||
$this->regenerateListPaused(); // this list require no translation
|
$this->regenerateListPaused(); //This list require no translation
|
||||||
$this->regenerateListUnassigned(); // this list require no translation
|
|
||||||
}
|
|
||||||
if (!$flagReinsert) {
|
|
||||||
$this->listFirstExecution("insert");
|
|
||||||
$this->listFirstExecution('insert', 'unassigned');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check for the List Unassigned
|
if ($flagReinsert || !$flagListUnassigned) {
|
||||||
if(!$this->listFirstExecution('check','unassigned')){
|
$this->regenerateListUnassigned(); //This list require no translation
|
||||||
$this->regenerateListUnassigned(); // this list require no translation
|
|
||||||
$this->listFirstExecution('insert', 'unassigned');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return
|
$this->listFirstExecution('insert');
|
||||||
return true;
|
$this->listFirstExecution('insert', 'unassigned');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function regenerateListCanceled($lang = 'en')
|
public function regenerateListCanceled($lang = 'en')
|
||||||
|
|||||||
Reference in New Issue
Block a user