';
if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1);
print '
';
+ print '
';
+
// Busy
- print '
'.$langs->trans("Busy").'
';
+ print '
'.$langs->trans("Busy").'
';
if ($object->usertodo->id > 0) print yn(($object->transparency > 0)?1:0); // We show nothing if event is assigned to nobody
print '
';
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index 048561b34e5..964dc751932 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -426,10 +426,15 @@ function actions_prepare_head($object)
$h++;
}
- $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
- $head[$h][1] = $langs->trans('Documents');
- $head[$h][2] = 'documents';
- $h++;
+ // Attached files
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+ $upload_dir = $conf->agenda->dir_output . "/" . $object->id;
+ $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
+ $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
+ $head[$h][1] = $langs->trans("Documents");
+ if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
+ $head[$h][2] = 'documents';
+ $h++;
$head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id;
$head[$h][1] = $langs->trans('Info');
diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
index a30c26ece3b..4d2888d8aff 100644
--- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
+++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
@@ -583,8 +583,8 @@ class InterfaceActionsAuto extends DolibarrTriggers
$actioncomm->contact = $contactforaction;
$actioncomm->societe = $societeforaction;
$actioncomm->author = $user; // User saving action
- $actioncomm->usertodo = $user; // User owner of action
- //$actioncomm->userdone = $user; // User doing action
+ $actioncomm->usertodo = $user; // User action is assigned to (owner of action)
+ //$actioncomm->userdone = $user; // User doing action (deprecated, not used anymore)
$actioncomm->fk_element = $object->id;
$actioncomm->elementtype = $object->element;
diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
index 33301e5efe9..6ed8d9827a1 100644
--- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
+++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
@@ -1681,4 +1681,7 @@ INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype,
-- Fix: Missing instruction not correctly done into 3.5
-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL;
-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL;
-
+
+UPDATE llx_actioncomm set fk_user_action = fk_user_done where fk_user_done > 0 and (fk_user_action is null or fk_user_action = 0);
+
+
diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index c6fcfc06ce6..d93fa69cd52 100644
--- a/htdocs/install/mysql/migration/repair.sql
+++ b/htdocs/install/mysql/migration/repair.sql
@@ -144,6 +144,8 @@ drop table tmp_societe_double;
UPDATE llx_projet_task SET fk_task_parent = 0 WHERE fk_task_parent = rowid
+UPDATE llx_actioncomm set fk_user_action = fk_user_done where fk_user_done > 0 and (fk_user_action is null or fk_user_action = 0);
+
-- Requests to clean old tables or external modules tables
@@ -175,11 +177,3 @@ UPDATE llx_projet_task SET fk_task_parent = 0 WHERE fk_task_parent = rowid
-- DROP TABLE llx_pos_moviments;
-- DROP TABLE llx_pos_ticketdet;
-
-
-
-
-
-
-
-
diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql
index 1dce458fb72..c42cf377b85 100644
--- a/htdocs/install/mysql/tables/llx_actioncomm.sql
+++ b/htdocs/install/mysql/tables/llx_actioncomm.sql
@@ -45,9 +45,9 @@ create table llx_actioncomm
fk_parent integer NOT NULL default 0,
fk_user_action integer, -- user id of owner of action (currently also user id of actor that must do action. In future, actors assigned to action will be an array into table llx_actioncomm_resources)
+ transparency integer, -- transparency (ical standard). used to say if user assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources)
- transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources)
- fk_user_done integer, -- user id of people that has made action (deprecated)
+ fk_user_done integer, -- user id of user that has made action (deprecated)
priority smallint,
fulldayevent smallint NOT NULL default 0,
diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang
index e7d2de76503..a7f2edfff22 100644
--- a/htdocs/langs/en_US/commercial.lang
+++ b/htdocs/langs/en_US/commercial.lang
@@ -62,7 +62,7 @@ LastProspectContactDone=Contact done
DateActionPlanned=Date event planned for
DateActionDone=Date event done
ActionAskedBy=Event reported by
-ActionAffectedTo=Event assigned to
+ActionAffectedTo=Event owned by
ActionDoneBy=Event done by
ActionUserAsk=Reported by
ErrorStatusCantBeZeroIfStarted=If field 'Date done' is filled, action is started (or finished), so field 'Status' can't be 0%%.