Fixed showing username in empty workflowitems

This commit is contained in:
Frank Schubert
2021-11-06 17:35:10 +01:00
parent 9c84e82d3c
commit 204426b270
3 changed files with 10 additions and 10 deletions
@@ -295,7 +295,6 @@ class LineworkController extends mfBaseController {
$t->workflowitems['kundenkabel_typ']->value->save();
}
}
$value = $termination->workflowitems['customer_cable_injected']->value->value_int;
foreach($termination->building->terminations as $t) {
$t->workflowitems['customer_cable_injected']->value->value_int = $value;
+10 -2
View File
@@ -17,6 +17,14 @@ class Workflowvalue extends mfBaseModel {
}
}
protected function beforeSave() {
if($this->new() == "new") {
$me = new User();
$me->loadMe();
$this->changed = date('U');
$this->changed_by = $me->id;
}
}
public function setValue($value) {
$this->item = $this->getProperty("item");
@@ -103,10 +111,10 @@ class Workflowvalue extends mfBaseModel {
$this->changed_by = $me->id;
}
if($this->new() == "new") {
/*if($this->new() == "new") {
$this->changed = date('U');
$this->changed_by = $me->id;
}
}*/
}
@@ -26,13 +26,6 @@ class WorkflowvalueModel {
$me = new User();
$me->loadMe();
if($model->changed === null) {
$model->changed = date('U');
}
if($model->changed_by === null) {
$model->changed_by = $me->id;
}
if($model->create_by === null) {
$model->create_by = $me->id;