Skip to content
Snippets Groups Projects
Commit 0391dbf1 authored by Regis Houssin's avatar Regis Houssin
Browse files

Works on enhancement of project tasks

parent 35270b10
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,7 @@ ALTER TABLE llx_projet_task ADD COLUMN datev datetime AFTER datee;
ALTER TABLE llx_projet_task CHANGE title label varchar(255) NOT NULL;
ALTER TABLE llx_projet_task ADD COLUMN description text AFTER label;
ALTER TABLE llx_projet_task MODIFY description text;
ALTER TABLE llx_projet_task MODIFY duration_effective real DEFAULT 0 NOT NULL;
ALTER TABLE llx_projet_task ADD COLUMN progress integer DEFAULT 0 AFTER duration_effective;
ALTER TABLE llx_projet_task ADD COLUMN priority integer DEFAULT 0 AFTER progress;
ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer AFTER fk_user_creat;
......
......@@ -31,7 +31,7 @@ create table llx_projet_task
datev datetime, -- date validation
label varchar(255) NOT NULL,
description text,
duration_effective real NOT NULL,
duration_effective real DEFAULT 0 NOT NULL,
progress integer DEFAULT 0, -- percentage increase
priority integer DEFAULT 0, -- priority
fk_user_creat integer, -- user who created the task
......
......@@ -77,9 +77,7 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
$taskid = $task->create($user);
if ($taskid > 0)
{
$task->update($user);
{
$result = $task->add_contact($_POST["userid"], 'TASKEXECUTIVE', 'internal');
}
}
......
......@@ -93,14 +93,22 @@ class Task extends CommonObject
$sql.= "fk_projet";
$sql.= ", fk_task_parent";
$sql.= ", label";
$sql.= ", description";
$sql.= ", datec";
$sql.= ", fk_user_creat";
$sql.= ", dateo";
$sql.= ", datee";
$sql.= ", progress";
$sql.= ") VALUES (";
$sql.= $this->fk_project;
$sql.= ", ".$this->fk_task_parent;
$sql.= ", '".addslashes($this->label)."'";
$sql.= ", '".addslashes($this->description)."'";
$sql.= ", ".$this->db->idate($this->date_c);
$sql.= ", ".$user->id;
$sql.= ", ".($this->date_start!=''?$this->db->idate($this->date_start):'null');
$sql.= ", ".($this->date_end!=''?$this->db->idate($this->date_end):'null');
$sql.= ", ".$this->progress;
$sql.= ")";
$this->db->begin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment