BUG 9830 "En Advanced Search no funciona la busqueda por..." SOLVED

- In AdvancedSearch no performs searches for user and category
- Problem solved, have been added to SOLR missing criteria for the search
- Note. - To register/upgrade the new criteria in the SOLR server, run the
  following script:
      $ php reindex_solr.php workspace_name reindexall
* Available from version 2.0.45
This commit is contained in:
Victor Saisa Lopez
2012-11-05 15:14:51 -04:00
parent 7f5911f85f
commit 977969985e
5 changed files with 760 additions and 263 deletions

View File

@@ -170,18 +170,23 @@ class Applications
}
*/
// add the process filter
if ($process != '') {
$Criteria->add( AppCacheViewPeer::PRO_UID, $process, Criteria::EQUAL );
$CriteriaCount->add( AppCacheViewPeer::PRO_UID, $process, Criteria::EQUAL );
//Add the process filter
if (!empty($process)) {
$Criteria->add(AppCacheViewPeer::PRO_UID, $process, Criteria::EQUAL);
$CriteriaCount->add(AppCacheViewPeer::PRO_UID, $process, Criteria::EQUAL);
}
// add the category filter
if ($category != '') {
$Criteria->addAlias( 'CP', 'PROCESS' );
$Criteria->add( 'CP.PRO_CATEGORY', $category, Criteria::EQUAL );
$Criteria->addJoin( AppCacheViewPeer::PRO_UID, 'CP.PRO_UID', Criteria::LEFT_JOIN );
$Criteria->addAsColumn( 'CATEGORY_UID', 'CP.PRO_CATEGORY' );
//Add the category filter
if (!empty($category)) {
$Criteria->addAlias("CP", "PROCESS");
$Criteria->add("CP.PRO_CATEGORY", $category, Criteria::EQUAL);
$Criteria->addJoin(AppCacheViewPeer::PRO_UID, "CP.PRO_UID", Criteria::LEFT_JOIN);
$Criteria->addAsColumn("CATEGORY_UID", "CP.PRO_CATEGORY");
$CriteriaCount->addAlias("CP", "PROCESS");
$CriteriaCount->add("CP.PRO_CATEGORY", $category, Criteria::EQUAL);
$CriteriaCount->addJoin(AppCacheViewPeer::PRO_UID, "CP.PRO_UID", Criteria::LEFT_JOIN);
$CriteriaCount->addAsColumn("CATEGORY_UID", "CP.PRO_CATEGORY");
}
// add the user filter
@@ -314,11 +319,13 @@ class Applications
if ($doCountAlreadyExecuted == false) {
// in the case of reassign the distinct attribute shows a diferent count result comparing to the
// original list
if (($action == "to_reassign" || $action == "todo") || ($status == "TO_DO")) {
//Check also $distinct in the method getListCounters(), this in AppCacheView.php
$distinct = true;
if (($action == "todo" || $action == "to_reassign") || ($status == "TO_DO")) {
$distinct = false;
} else {
$distinct = true;
}
// first check if there is a PMTable defined within the list,
// the issue that brokes the normal criteria query seems to be fixed
if (isset( $oAppCache->confCasesList['PMTable'] ) && ! empty( $oAppCache->confCasesList['PMTable'] )) {