BUG 11835 : Assignment rules after upgrade to 2.0.46

Sol: Adding patch for next PM versions using SELF_SERVICE. Plus checking Version to set the patch.
This commit is contained in:
ralpheav
2013-06-05 11:04:13 -04:00
parent cdb43f480c
commit 86825ff1db

View File

@@ -2,9 +2,7 @@
G::LoadClass("Task"); G::LoadClass("Task");
G::LoadClass("TaskUser"); G::LoadClass("TaskUser");
G::LoadClass("System");
require_once ("propel/Propel.php");
require_once ("creole/Creole.php");
/** /**
* class, helping to set some not desirable settings but necesary * class, helping to set some not desirable settings but necesary
@@ -29,8 +27,13 @@ class patch
$rs = $stmt->executeQuery(); $rs = $stmt->executeQuery();
$rs->next(); $rs->next();
while($row = $rs->getRow()) { while($row = $rs->getRow()) {
if ($row ['Field'] == "TAS_GROUP_VARIABLE"){ if ($row ['Field'] == "TAS_GROUP_VARIABLE") {
patch::$isPathchable = true; $version = System::getVersion ();
$pos = strpos($version,'2.5.1-testing');
if ($version == '2.5.0.1' || $pos !== false) {
echo "Version ".$version . " Patch\n";
patch::$isPathchable = true;
}
break; break;
} }
$rs->next(); $rs->next();
@@ -64,12 +67,9 @@ class patch
echo "Patching uid: " . $tasUid . "\n"; echo "Patching uid: " . $tasUid . "\n";
//Set the values if they match the pattern //Set the values if they match the pattern
$conChange = Propel::getConnection("workflow"); $conChange = Propel::getConnection("workflow");
$stmtChange = $conChange->prepareStatement("update TASK set TAS_GROUP_VARIABLE = '';"); $stmtChange = $conChange->prepareStatement("update TASK set TAS_GROUP_VARIABLE = '' where TAS_UID = '".$tasUid."';");
$recordResult = $stmtChange->executeQuery(); $recordResult = $stmtChange->executeQuery();
$count++; $count++;
//$task->load( $tasUid );
//$task->setTasGroupVariable('');
//$task->save();
} }
$recordSet->next(); $recordSet->next();
$aRow = $recordSet->getRow(); $aRow = $recordSet->getRow();
@@ -79,3 +79,4 @@ class patch
} }
} }