Merge branch 'master' of code.fronk.at:fronk/thetool
This commit is contained in:
@@ -222,6 +222,24 @@ class CpeprovisioningController extends mfBaseController {
|
||||
if($r->ont_sn) {
|
||||
$termination = new Termination($termination_id);
|
||||
$orig_sn = $termination->getWorkflowvalue("ont_sn", "string");
|
||||
|
||||
if($orig_sn === null) {
|
||||
|
||||
$sn_item = WorkflowitemModel::getFirst(["name" => "ont_sn", "object_type" => "termination"]);
|
||||
//var_dump($sn_item);exit;
|
||||
//var_dump(mfValuecache::singleton()->get("wfItemvalue-item-".$sn_item->id."-object-".$termination_id));exit;
|
||||
if(!$sn_item->id) {
|
||||
$this->log->error("ont_sn workflow item not found");
|
||||
} else {
|
||||
$sn_item->setObjectId($termination_id);
|
||||
$termination->workflowitems["ont_sn"] = $sn_item;
|
||||
//$sn_item->value->setValue($r->ont_sn);
|
||||
|
||||
//$sn_item->value->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($r->ont_sn != $orig_sn) {
|
||||
$termination->workflowitems["ont_sn"]->value->setValue($r->ont_sn);
|
||||
$termination->workflowitems["ont_sn"]->value->save();
|
||||
|
||||
@@ -50,9 +50,11 @@ class Termination extends mfBaseModel {
|
||||
mfValuecache::singleton()->set("wfTerm-id-".$item->id, $item);
|
||||
$item->setObjectId($this->id);
|
||||
|
||||
$new_value = new Workflowvalue();
|
||||
$new_value = WorkflowvalueModel::create(['item_id' => $item->id, 'object_id' => $this->id]);
|
||||
|
||||
/*$new_value = new Workflowvalue();
|
||||
$new_value->item_id = $item->id;
|
||||
$new_value->object_id = $this->id;
|
||||
$new_value->object_id = $this->id;*/
|
||||
//$this->log->debug("empty value has item_id: ".$new_value->item_id." - object_id: ".$new_value->object_id. ". Goes into cache as wfItemvalue-item-".$item->id."-object-".$this->id." value: ".$new_value->value_string);
|
||||
|
||||
mfValuecache::singleton()->set("wfItemvalue-item-".$item->id."-object-".$this->id, $new_value);
|
||||
|
||||
@@ -37,6 +37,9 @@ class Workflowitem extends mfBaseModel {
|
||||
return null;
|
||||
}
|
||||
$value = mfValuecache::singleton()->get("wfItemvalue-item-".$this->id."-object-".$this->object_id);
|
||||
if($this->id == 55 && $this->object_id == 509) {
|
||||
var_dump($value);exit;
|
||||
}
|
||||
if($value) {
|
||||
$this->value = $value;
|
||||
return $value;
|
||||
@@ -48,7 +51,6 @@ class Workflowitem extends mfBaseModel {
|
||||
$vdata['item_id'] = $this->id;
|
||||
$vdata['object_id'] = $this->object_id;
|
||||
$value = WorkflowvalueModel::create($vdata);
|
||||
|
||||
}
|
||||
$this->value = $value;
|
||||
return $this->value;
|
||||
|
||||
Reference in New Issue
Block a user