Works on enhancement of project tasks

This commit is contained in:
Regis Houssin 2010-01-22 17:49:13 +00:00
parent 2cf11c4259
commit f4230d9787
5 changed files with 38 additions and 14 deletions

View File

@ -105,3 +105,19 @@ ALTER TABLE llx_bank_class DROP INDEX uk_bank_class_lineid;
ALTER TABLE llx_bank_class ADD UNIQUE INDEX uk_bank_class_lineid (lineid, fk_categ);
ALTER TABLE llx_rights_def MODIFY COLUMN module varchar(64);
-- Enhancement of project tasks
ALTER TABLE llx_projet_task ADD COLUMN datec datetime AFTER fk_task_parent;
ALTER TABLE llx_projet_task ADD COLUMN tms timestamp AFTER datec;
ALTER TABLE llx_projet_task ADD COLUMN dateo datetime AFTER tms;
ALTER TABLE llx_projet_task ADD COLUMN datee datetime AFTER dateo;
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 varchar(255) AFTER label;
ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer AFTER fk_user_creat;
ALTER TABLE llx_projet_task ADD COLUMN fk_user_valid integer AFTER fk_user_modif;
UPDATE llx_projet_task SET statut='1' WHERE statut='open';
ALTER TABLE llx_projet_task CHANGE statut fk_statut smallint DEFAULT 0 NOT NULL;
ALTER TABLE llx_projet_task CHANGE note note_private text;
ALTER TABLE llx_projet_task ADD COLUMN note_public text AFTER note_private;

View File

@ -21,6 +21,3 @@
ALTER TABLE llx_projet_task ADD CONSTRAINT fk_projet_task_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);

View File

@ -1,5 +1,6 @@
-- ===========================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -20,12 +21,20 @@
create table llx_projet_task
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_projet integer NOT NULL,
fk_task_parent integer NOT NULL,
title varchar(255),
duration_effective real NOT NULL,
fk_user_creat integer, -- createur
statut varchar(6) DEFAULT 'open',
note text
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_projet integer NOT NULL,
fk_task_parent integer DEFAULT 0 NOT NULL,
datec datetime, -- date creation
tms timestamp, -- date creation/modification
dateo datetime, -- date start task
datee datetime, -- date end task
datev datetime, -- date validation
label varchar(255) NOT NULL,
description varchar(255),
duration_effective real NOT NULL,
fk_user_creat integer, -- user who created the task
fk_user_valid integer, -- user who validated the task
fk_statut smallint DEFAULT 0 NOT NULL,
note_private text,
note_public text
)type=innodb;

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +21,7 @@
/**
* \file htdocs/projet/tasks/task.php
* \ingroup projet
* \brief Fiche t<EFBFBD>ches d'un projet
* \brief Fiche taches d'un projet
* \version $Id$
*/
@ -159,7 +160,7 @@ if ($_GET["id"] > 0)
*/
print '<div class="tabsAction">';
if (!$user->rights->projet->creer)
if ($user->rights->projet->supprimer)
{
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$task->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
}

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +21,7 @@
/**
* \file htdocs/projet/tasks/task.php
* \ingroup projet
* \brief Fiche t<EFBFBD>ches d'un projet
* \brief Fiche taches d'un projet
* \version $Id$
*/