Task::create()'s INSERT statement omitted the rang column. Project clone flows go through Task::createFromClone -> Task::create with the rang copied from the source task, but because the INSERT never wrote it the new tasks always ended up with rang=0 (the column default) and the duplicated project lost the drag/drop ordering. Include rang in the INSERT, mirroring the update() statement at line 692 that already does '($this->rang ?: 0)'. Signed-off-by: Dolicraft <contact@dolicraft.com> Co-authored-by: Dolicraft <contact@dolicraft.com>
This commit is contained in:
parent
f6379d0cd9
commit
788b2af518
1 changed files with 2 additions and 0 deletions
|
|
@ -453,6 +453,7 @@ class Task extends CommonObjectLine
|
|||
$sql .= ", priority";
|
||||
$sql .= ", billable";
|
||||
$sql .= ", fk_statut";
|
||||
$sql .= ", rang";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= (!empty($this->entity) ? (int) $this->entity : (int) $conf->entity);
|
||||
$sql .= ", ".((int) $this->fk_project);
|
||||
|
|
@ -472,6 +473,7 @@ class Task extends CommonObjectLine
|
|||
$sql .= ", ".(($this->priority != '' && $this->priority >= 0) ? (int) $this->priority : 'null');
|
||||
$sql .= ", ".((int) $this->billable);
|
||||
$sql .= ", ".((int) $this->status);
|
||||
$sql .= ", ".((!empty($this->rang)) ? ((int) $this->rang) : "0");
|
||||
$sql .= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
|
|
|||
Loading…
Reference in a new issue