note_private and note_public was forgotten too (#29440)
* note_private and note_public was forgotten * sql error missing comma * sql error missing comma for rang=
This commit is contained in:
parent
2768d80b9b
commit
c8ef530d52
1 changed files with 19 additions and 3 deletions
|
|
@ -154,6 +154,8 @@ class Task extends CommonObject
|
|||
// Clean parameters
|
||||
$this->label = trim($this->label);
|
||||
$this->description = trim($this->description);
|
||||
$this->note_public = trim($this->note_public);
|
||||
$this->note_private = trim($this->note_private);
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
|
|
@ -166,6 +168,8 @@ class Task extends CommonObject
|
|||
$sql .= ", fk_task_parent";
|
||||
$sql .= ", label";
|
||||
$sql .= ", description";
|
||||
$sql .= ", note_public";
|
||||
$sql .= ", note_private";
|
||||
$sql .= ", datec";
|
||||
$sql .= ", fk_user_creat";
|
||||
$sql .= ", dateo";
|
||||
|
|
@ -180,6 +184,8 @@ class Task extends CommonObject
|
|||
$sql .= ", ".((int) $this->fk_task_parent);
|
||||
$sql .= ", '".$this->db->escape($this->label)."'";
|
||||
$sql .= ", '".$this->db->escape($this->description)."'";
|
||||
$sql .= ", '".$this->db->escape($this->note_public)."'";
|
||||
$sql .= ", '".$this->db->escape($this->note_private)."'";
|
||||
$sql .= ", '".$this->db->idate($now)."'";
|
||||
$sql .= ", ".((int) $user->id);
|
||||
$sql .= ", ".($this->date_start ? "'".$this->db->idate($this->date_start)."'" : 'null');
|
||||
|
|
@ -362,6 +368,12 @@ class Task extends CommonObject
|
|||
if (isset($this->description)) {
|
||||
$this->description = trim($this->description);
|
||||
}
|
||||
if (isset($this->note_public)) {
|
||||
$this->note_public = trim($this->note_public);
|
||||
}
|
||||
if (isset($this->note_private)) {
|
||||
$this->note_private = trim($this->note_private);
|
||||
}
|
||||
if (isset($this->duration_effective)) {
|
||||
$this->duration_effective = trim($this->duration_effective);
|
||||
}
|
||||
|
|
@ -379,12 +391,14 @@ class Task extends CommonObject
|
|||
$sql .= " fk_task_parent=".(isset($this->fk_task_parent) ? $this->fk_task_parent : "null").",";
|
||||
$sql .= " label=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").",";
|
||||
$sql .= " description=".(isset($this->description) ? "'".$this->db->escape($this->description)."'" : "null").",";
|
||||
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
|
||||
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
||||
$sql .= " duration_effective=".(isset($this->duration_effective) ? $this->duration_effective : "null").",";
|
||||
$sql .= " planned_workload=".((isset($this->planned_workload) && $this->planned_workload != '') ? $this->planned_workload : "null").",";
|
||||
$sql .= " dateo=".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null').",";
|
||||
$sql .= " datee=".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null').",";
|
||||
$sql .= " progress=".(($this->progress != '' && $this->progress >= 0) ? $this->progress : 'null').",";
|
||||
$sql .= " rang=".((!empty($this->rang)) ? $this->rang : "0");
|
||||
$sql .= " rang=".((!empty($this->rang)) ? $this->rang : "0").",";
|
||||
$sql .= " priority=".((!empty($this->priority)) ? $this->priority : "0");
|
||||
$sql .= " WHERE rowid=".((int) $this->id);
|
||||
|
||||
|
|
@ -795,7 +809,7 @@ class Task extends CommonObject
|
|||
$sql .= " p.rowid as projectid, p.ref, p.title as plabel, p.public, p.fk_statut as projectstatus, p.usage_bill_time,";
|
||||
$sql .= " t.rowid as taskid, t.ref as taskref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut as status,";
|
||||
$sql .= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang, t.priority,";
|
||||
$sql .= " t.description, ";
|
||||
$sql .= " t.note_public, t.note_private,";
|
||||
$sql .= " s.rowid as thirdparty_id, s.nom as thirdparty_name, s.email as thirdparty_email,";
|
||||
$sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount";
|
||||
if (!empty($extrafields->attributes['projet']['label'])) {
|
||||
|
|
@ -901,7 +915,7 @@ class Task extends CommonObject
|
|||
$sql .= " t.datec, t.dateo, t.datee, t.tms,";
|
||||
$sql .= " t.rowid, t.ref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut,";
|
||||
$sql .= " t.dateo, t.datee, t.planned_workload, t.rang, t.priority,";
|
||||
$sql .= " t.description, ";
|
||||
$sql .= " t.note_public, t.note_private, ";
|
||||
$sql .= " s.rowid, s.nom, s.email,";
|
||||
$sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount";
|
||||
if (!empty($extrafields->attributes['projet']['label'])) {
|
||||
|
|
@ -960,6 +974,8 @@ class Task extends CommonObject
|
|||
$tasks[$i]->label = $obj->label;
|
||||
$tasks[$i]->description = $obj->description;
|
||||
$tasks[$i]->fk_parent = $obj->fk_task_parent; // deprecated
|
||||
$tasks[$i]->note_public = $obj->note_public;
|
||||
$tasks[$i]->note_private = $obj->note_private;
|
||||
$tasks[$i]->fk_task_parent = $obj->fk_task_parent;
|
||||
$tasks[$i]->duration = $obj->duration_effective;
|
||||
$tasks[$i]->planned_workload = $obj->planned_workload;
|
||||
|
|
|
|||
Loading…
Reference in a new issue