From ebdbddb7fd0d953889de8796bb48ca60a2b72eb1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Dec 2017 19:50:39 +0100 Subject: [PATCH] Fix error message and migration --- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 12 ++++++++++++ htdocs/langs/en_US/projects.lang | 1 + htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/perweek.php | 6 +++--- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index bf49e8730fb..07bbee53987 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -615,3 +615,15 @@ ALTER TABLE llx_resource ADD fk_country integer DEFAULT NULL; ALTER TABLE llx_resource ADD INDEX idx_resource_fk_country (fk_country); ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_country FOREIGN KEY (fk_country) REFERENCES llx_c_country (rowid); + + +CREATE TABLE llx_projet_task_comment ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + datec datetime DEFAULT NULL, + tms timestamp, + description text NOT NULL, + fk_user integer DEFAULT NULL, + fk_task integer DEFAULT NULL, + entity integer DEFAULT 1, + import_key varchar(125) DEFAULT NULL +) ENGINE=innodb; diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 7075f45ecd2..48bd55a41ee 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -215,6 +215,7 @@ AllowToLinkFromOtherCompany=Allow to link project from other company

S LatestProjects=Latest %s projects LatestModifiedProjects=Latest %s modified projects OtherFilteredTasks=Other filtered tasks +NoAssignedTasks=No assigned tasks (assign yourself project/tasks from the top select box to enter time on it) # Comments trans AllowCommentOnTask=Allow user comments on tasks AllowCommentOnProject=Allow user comments on projects diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index eb710ce62a2..e3e5a2a4efb 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -568,7 +568,7 @@ if (count($tasksarray) > 0) } else { - print ''.$langs->trans("NoTasks").''; + print ''.$langs->trans("NoAssignedTasks").''; } print ""; print ''; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 97574ef53b9..023ccd611dd 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -332,10 +332,10 @@ if ($search_task_ref) $morewherefilter.=natural_search("t.ref", $search_task_r if ($search_task_label) $morewherefilter.=natural_search(array("t.ref", "t.label"), $search_task_label); if ($search_thirdparty) $morewherefilter.=natural_search("s.nom", $search_thirdparty); -$tasksarray=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all task of opened project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. +$tasksarray=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. if ($morewherefilter) // Get all task with no filter so we can show total of time spent for not visible tasks { - $tasksarraywithoutfilter=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all task of opened project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. + $tasksarraywithoutfilter=$taskstatic->getTasksArray(0, 0, ($project->id?$project->id:0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid?$search_usertoprocessid:0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. } $projectsrole=$taskstatic->getUserRolesForProjectsOrTasks($usertoprocess, 0, ($project->id?$project->id:0), 0, $onlyopenedproject); $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0, $usertoprocess, ($project->id?$project->id:0), 0, $onlyopenedproject); @@ -595,7 +595,7 @@ if (count($tasksarray) > 0) } else { - print ''.$langs->trans("NoTasks").''; + print ''.$langs->trans("NoAssignedTasks").''; } print ""; print '';