HOR-4773
This commit is contained in:
@@ -151,21 +151,6 @@ EOT
|
||||
CLI::taskOpt("workspace", "Select the workspace whose case folders will be migrated, if multiple workspaces are present in the server.\n Ex: -wworkflow. Ex: --workspace=workflow", "w:", "workspace=");
|
||||
CLI::taskRun("runStructureDirectories");
|
||||
|
||||
CLI::taskName("database-generate-self-service-by-value");
|
||||
CLI::taskDescription(<<<EOT
|
||||
Generate or upgrade the table "self-service by value".
|
||||
|
||||
This command populates the table "self-service by value" for cases whose
|
||||
task is defined with "Self Service Value Based Assignment" in "Assignment
|
||||
Rules".
|
||||
|
||||
If no workspace is specified, the command will be run in all workspaces. More
|
||||
than one workspace can be specified.
|
||||
EOT
|
||||
);
|
||||
CLI::taskArg("workspace-name", true, true);
|
||||
CLI::taskRun("run_database_generate_self_service_by_value");
|
||||
|
||||
CLI::taskName('database-verify-consistency');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Verify that the database data is consistent so any database-upgrade operation will be executed flawlessly.
|
||||
@@ -931,33 +916,6 @@ function runStructureDirectories($command, $args)
|
||||
}
|
||||
}
|
||||
|
||||
function run_database_generate_self_service_by_value($args, $opts)
|
||||
{
|
||||
$filter = new InputFilter();
|
||||
$opts = $filter->xssFilterHard($opts);
|
||||
$args = $filter->xssFilterHard($args);
|
||||
try {
|
||||
$arrayWorkspace = get_workspaces_from_args($args);
|
||||
|
||||
foreach ($arrayWorkspace as $value) {
|
||||
$workspace = $value;
|
||||
|
||||
try {
|
||||
G::outRes("Generating the table \"self-service by value\" for " . pakeColor::colorize($workspace->name, "INFO") . "\n");
|
||||
$workspace->appAssignSelfServiceValueTableGenerateData();
|
||||
} catch (Exception $e) {
|
||||
G::outRes("Errors generating the table \"self-service by value\" of workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n");
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
G::outRes(CLI::error($e->getMessage()) . "\n");
|
||||
}
|
||||
}
|
||||
|
||||
function run_database_verify_consistency($args, $opts)
|
||||
{
|
||||
verifyAppCacheConsistency($args);
|
||||
|
||||
@@ -2319,7 +2319,10 @@ class WorkspaceTools
|
||||
/**
|
||||
* Generate data for table APP_ASSIGN_SELF_SERVICE_VALUE
|
||||
*
|
||||
* return void
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*
|
||||
* @deprecated Method deprecated in Release 3.3.0
|
||||
*/
|
||||
public function appAssignSelfServiceValueTableGenerateData()
|
||||
{
|
||||
|
||||
@@ -94,7 +94,10 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue
|
||||
/**
|
||||
* Generate data
|
||||
*
|
||||
* return void
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*
|
||||
* @deprecated Method deprecated in Release 3.3.0
|
||||
*/
|
||||
public function generateData()
|
||||
{
|
||||
@@ -133,7 +136,15 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue
|
||||
$dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable);
|
||||
|
||||
if (!empty($dataVariable)) {
|
||||
$this->create($row["APP_UID"], $row["DEL_INDEX"], array("PRO_UID" => $row["PRO_UID"], "TAS_UID" => $row["TAS_UID"], "GRP_UID" => serialize($dataVariable)));
|
||||
$this->create(
|
||||
$row["APP_UID"],
|
||||
$row["DEL_INDEX"],
|
||||
[
|
||||
"PRO_UID" => $row["PRO_UID"],
|
||||
"TAS_UID" => $row["TAS_UID"],
|
||||
"GRP_UID" => serialize($dataVariable)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user