Fix regression introduced with task comments
This commit is contained in:
parent
db91a88c59
commit
929893bd49
@ -452,17 +452,19 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
|||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10);
|
||||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10);
|
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10);
|
||||||
|
|
||||||
CREATE TABLE llx_projet_task_comment (
|
DROP TABLE llx_projet_task_comment;
|
||||||
|
|
||||||
|
CREATE TABLE llx_comment (
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
datec datetime DEFAULT NULL,
|
datec datetime DEFAULT NULL,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
fk_user integer DEFAULT NULL,
|
fk_user_author integer DEFAULT NULL,
|
||||||
fk_task integer DEFAULT NULL,
|
fk_element integer DEFAULT NULL,
|
||||||
|
element_type varchar(50) DEFAULT NULL,
|
||||||
entity integer DEFAULT 1,
|
entity integer DEFAULT 1,
|
||||||
import_key varchar(125) DEFAULT NULL
|
import_key varchar(125) DEFAULT NULL
|
||||||
) ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
DELETE FROM llx_const where name = __ENCRYPT('MAIN_SHOW_WORKBOARD')__;
|
DELETE FROM llx_const where name = __ENCRYPT('MAIN_SHOW_WORKBOARD')__;
|
||||||
|
|
||||||
|
|||||||
@ -16,13 +16,15 @@
|
|||||||
--
|
--
|
||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
|
|
||||||
CREATE TABLE llx_projet_task_comment (
|
CREATE TABLE llx_comment (
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
datec datetime DEFAULT NULL,
|
datec datetime DEFAULT NULL,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
description text NOT NULL,
|
description text NOT NULL,
|
||||||
fk_user integer DEFAULT NULL,
|
fk_user_author integer DEFAULT NULL,
|
||||||
fk_task integer DEFAULT NULL,
|
fk_element integer DEFAULT NULL,
|
||||||
|
element_type varchar(50) DEFAULT NULL,
|
||||||
entity integer DEFAULT 1,
|
entity integer DEFAULT 1,
|
||||||
import_key varchar(125) DEFAULT NULL
|
import_key varchar(125) DEFAULT NULL
|
||||||
) ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
@ -388,6 +388,8 @@ class Project extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch($id, $ref='')
|
function fetch($id, $ref='')
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
if (empty($id) && empty($ref)) return -1;
|
if (empty($id) && empty($ref)) return -1;
|
||||||
|
|
||||||
$sql = "SELECT rowid, ref, title, description, public, datec, opp_amount, budget_amount,";
|
$sql = "SELECT rowid, ref, title, description, public, datec, opp_amount, budget_amount,";
|
||||||
@ -443,7 +445,11 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
// Retreive all extrafield for thirdparty
|
// Retreive all extrafield for thirdparty
|
||||||
$this->fetch_optionals();
|
$this->fetch_optionals();
|
||||||
$this->fetchComments();
|
|
||||||
|
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT))
|
||||||
|
{
|
||||||
|
$this->fetchComments();
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ class Task extends CommonObject
|
|||||||
public $table_element='projet_task'; //!< Name of table without prefix where object is stored
|
public $table_element='projet_task'; //!< Name of table without prefix where object is stored
|
||||||
public $fk_element='fk_task';
|
public $fk_element='fk_task';
|
||||||
public $picto = 'task';
|
public $picto = 'task';
|
||||||
protected $childtables=array('projet_task_time','projet_task_comment'); // To test if we can delete object
|
protected $childtables=array('projet_task_time'); // To test if we can delete object
|
||||||
|
|
||||||
var $fk_task_parent;
|
var $fk_task_parent;
|
||||||
var $label;
|
var $label;
|
||||||
|
|||||||
@ -55,7 +55,6 @@ if (! $user->rights->projet->lire) accessforbidden();
|
|||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('projectcard','globalcard'));
|
$hookmanager->initHooks(array('projectcard','globalcard'));
|
||||||
|
|
||||||
$object = new Project($db);
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user