BUG-9449 Error in reassign and review of supervisor
Error ----- Error in reassign and review of supervisor. This is caused because Solr don't support those views. Solution --------- The filter to use Solr or DB was corrected to use DB in the case of Supervisor views. Also a new exception was created to inform that APP_DATA could not be unserialized, and the logic is not going to stop when an error of unserialization is run in the reindex process.
This commit is contained in:
@@ -66,7 +66,7 @@ class InvalidIndexSearchTextException extends Exception
|
|||||||
* @author Herbert Saal Gutierrez
|
* @author Herbert Saal Gutierrez
|
||||||
*
|
*
|
||||||
* @category Colosa
|
* @category Colosa
|
||||||
* @copyright Copyright (c) 2005-2011 Colosa Inc. (http://www.colosa.com)
|
* @copyright Copyright (c) 2005-2012 Colosa Inc. (http://www.colosa.com)
|
||||||
*/
|
*/
|
||||||
class ApplicationWithoutDelegationRecordsException extends Exception
|
class ApplicationWithoutDelegationRecordsException extends Exception
|
||||||
{
|
{
|
||||||
@@ -85,6 +85,31 @@ class ApplicationWithoutDelegationRecordsException extends Exception
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application APP_DATA could not be unserialized exception
|
||||||
|
*
|
||||||
|
* @author Herbert Saal Gutierrez
|
||||||
|
*
|
||||||
|
* @category Colosa
|
||||||
|
* @copyright Copyright (c) 2005-2012 Colosa Inc. (http://www.colosa.com)
|
||||||
|
*/
|
||||||
|
class ApplicationAPP_DATAUnserializeException extends Exception
|
||||||
|
{
|
||||||
|
// Redefine the exception so message isn't optional
|
||||||
|
public function __construct($message, $code = 0)
|
||||||
|
{
|
||||||
|
// some code
|
||||||
|
// make sure everything is assigned properly
|
||||||
|
parent::__construct ($message, $code);
|
||||||
|
}
|
||||||
|
|
||||||
|
// custom string representation of object
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation to display application data in the PMOS2 grids using Solr
|
* Implementation to display application data in the PMOS2 grids using Solr
|
||||||
* search service
|
* search service
|
||||||
@@ -1015,11 +1040,23 @@ class AppSolr
|
|||||||
$unassignedUsers = $result [11];
|
$unassignedUsers = $result [11];
|
||||||
$unassignedGroups = $result [12];
|
$unassignedGroups = $result [12];
|
||||||
|
|
||||||
// create document
|
try {
|
||||||
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
// create document
|
||||||
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
$xmlDoc .= $this->buildSearchIndexDocumentPMOS2 ($documentInformation, $dynaformFieldTypes,
|
||||||
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
$lastUpdateDate, $maxPriority, $assignedUsers, $assignedUsersRead, $assignedUsersUnread,
|
||||||
$unassignedUsers, $unassignedGroups);
|
$draftUser, $participatedUsers, $participatedUsersStartedByUser, $participatedUsersCompletedByUser,
|
||||||
|
$unassignedUsers, $unassignedGroups);
|
||||||
|
}
|
||||||
|
catch ( ApplicationAPP_DATAUnserializeException $e ) {
|
||||||
|
// exception trying to get application information
|
||||||
|
|
||||||
|
//print $e->message +" \n";
|
||||||
|
//$fh = fopen("./UnserializeError_APP_DATA".".txt", 'a') or die("can't open file");
|
||||||
|
//fwrite($fh, $e->message . "\n");
|
||||||
|
//fclose($fh);
|
||||||
|
// skip and continue with the next application
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1288,7 +1325,7 @@ class AppSolr
|
|||||||
|
|
||||||
if (! $UnSerializedCaseData) {
|
if (! $UnSerializedCaseData) {
|
||||||
// error unserializing
|
// error unserializing
|
||||||
throw new Exception ("Unserialize APP_DATA error. APP_UID: " . $documentData ['APP_UID']);
|
throw new ApplicationAPP_DATAUnserializeException ("Could not unserialize APP_DATA of APP_UID: " . $documentData ['APP_UID']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach ($UnSerializedCaseData as $k => $value) {
|
foreach ($UnSerializedCaseData as $k => $value) {
|
||||||
@@ -1390,7 +1427,7 @@ class AppSolr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // foreach unserialized data
|
} // foreach unserialized data
|
||||||
}
|
}// else unserialize APP_DATA
|
||||||
} // empty APP_DATA
|
} // empty APP_DATA
|
||||||
|
|
||||||
$writer->endElement (); // end /doc
|
$writer->endElement (); // end /doc
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ try {
|
|||||||
|
|
||||||
$userUid = (isset ( $_SESSION ['USER_LOGGED'] ) && $_SESSION ['USER_LOGGED'] != '') ? $_SESSION ['USER_LOGGED'] : null;
|
$userUid = (isset ( $_SESSION ['USER_LOGGED'] ) && $_SESSION ['USER_LOGGED'] != '') ? $_SESSION ['USER_LOGGED'] : null;
|
||||||
|
|
||||||
if ((($solrConf = System::solrEnv()) !== false) && $action != 'paused') {
|
if (($action == 'todo' || $action == 'draft' || $action == 'sent' || $action == 'selfservice' || $action == 'unassigned' || $action == 'search') && (($solrConf = System::solrEnv()) !== false)) {
|
||||||
G::LoadClass ( 'AppSolr' );
|
G::LoadClass ( 'AppSolr' );
|
||||||
$ApplicationSolrIndex = new AppSolr ($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
|
$ApplicationSolrIndex = new AppSolr ($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user