Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur
2024-04-22 14:17:06 +02:00
2 changed files with 37 additions and 7 deletions

View File

@@ -198,6 +198,7 @@ class Task extends CommonObjectLine
$sql .= ", planned_workload";
$sql .= ", progress";
$sql .= ", budget_amount";
$sql .= ", priority";
$sql .= ") VALUES (";
$sql .= (!empty($this->entity) ? (int) $this->entity : (int) $conf->entity);
$sql .= ", ".((int) $this->fk_project);
@@ -212,6 +213,7 @@ class Task extends CommonObjectLine
$sql .= ", ".(($this->planned_workload != '' && $this->planned_workload >= 0) ? ((int) $this->planned_workload) : 'null');
$sql .= ", ".(($this->progress != '' && $this->progress >= 0) ? ((int) $this->progress) : 'null');
$sql .= ", ".(($this->budget_amount != '' && $this->budget_amount >= 0) ? ((int) $this->budget_amount) : 'null');
$sql .= ", ".(($this->priority != '' && $this->priority >= 0) ? (int) $this->priority : 'null');
$sql .= ")";
$this->db->begin();
@@ -423,6 +425,7 @@ class Task extends CommonObjectLine
$sql .= " progress=".(($this->progress != '' && $this->progress >= 0) ? $this->progress : 'null').",";
$sql .= " budget_amount=".(($this->budget_amount != '' && $this->budget_amount >= 0) ? $this->budget_amount : 'null').",";
$sql .= " rang=".((!empty($this->rang)) ? $this->rang : "0");
$sql .= " priority=".((!empty($this->priority)) ? $this->priority : "0");
$sql .= " WHERE rowid=".((int) $this->id);
$this->db->begin();
@@ -791,6 +794,7 @@ class Task extends CommonObjectLine
$this->duration_effective = '';
$this->fk_user_creat = null;
$this->progress = '25';
$this->priority = 0;
$this->fk_statut = null;
$this->note = 'This is a specimen task not';
}
@@ -833,7 +837,7 @@ class Task extends CommonObjectLine
}
$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,";
$sql .= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang, t.priority,";
$sql .= " t.description, ";
$sql .= " t.budget_amount, ";
$sql .= " s.rowid as thirdparty_id, s.nom as thirdparty_name, s.email as thirdparty_email,";
@@ -941,7 +945,7 @@ class Task extends CommonObjectLine
$sql .= " GROUP BY p.rowid, p.ref, p.title, p.public, p.fk_statut, p.usage_bill_time,";
$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,";
$sql .= " t.dateo, t.datee, t.planned_workload, t.rang, t.priority,";
$sql .= " t.description, ";
$sql .= " t.budget_amount, ";
$sql .= " s.rowid, s.nom, s.email,";
@@ -1023,6 +1027,7 @@ class Task extends CommonObjectLine
$tasks[$i]->date_start = $this->db->jdate($obj->date_start);
$tasks[$i]->date_end = $this->db->jdate($obj->date_end);
$tasks[$i]->rang = $obj->rang;
$tasks[$i]->priority = $obj->priority;
$tasks[$i]->socid = $obj->thirdparty_id; // For backward compatibility
$tasks[$i]->thirdparty_id = $obj->thirdparty_id;
@@ -1903,6 +1908,7 @@ class Task extends CommonObjectLine
$clone_task->date_c = $datec;
$clone_task->planned_workload = $origin_task->planned_workload;
$clone_task->rang = $origin_task->rang;
$clone_task->priority = $origin_task->priority;
//Manage Task Date
if ($clone_change_dt) {