diff --git a/build/debian/dolibarr.postinst b/build/debian/dolibarr.postinst index f45ab7680c4..0f99f53203b 100644 --- a/build/debian/dolibarr.postinst +++ b/build/debian/dolibarr.postinst @@ -131,19 +131,19 @@ case "$1" in setup_empty_conf else # File already exist. We add params not found. - echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config - grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config - grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config - #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + #echo Add new params to overwrite path to use shared libraries/fonts + #grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + ##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + ##grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + ##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + #grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + #grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + #grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + #grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config fi db_get dolibarr/reconfigure-webserver diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index ad16cca00f6..f04c9e372a9 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -514,18 +514,18 @@ if ($action == 'create') // Location print ''.$langs->trans("Location").''; + // Assigned to + $var=false; + print ''.$langs->trans("ActionAffectedTo").''; + $form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); + print ''; + print ''; print '

'; print ''; - // Assigned to - $var=false; - print ''; - // Busy print ''; - print '
'.$langs->trans("ActionAffectedTo").''; - $form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); - print '
'.$langs->trans("Busy").''; print ''; @@ -764,15 +764,15 @@ if ($id > 0) // Location print '
'.$langs->trans("Location").'


'; - // Assigned to - print ''; + print '
'.$langs->trans("ActionAffectedTo").''; + print '
'.$langs->trans("ActionAffectedTo").''; print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'affectedto',1); print '


'; + // Busy - print ''; @@ -939,15 +939,15 @@ if ($id > 0) // Location print ''; - print '
'.$langs->trans("Busy").''; + print '
'.$langs->trans("Busy").''; print 'transparency?' checked="checked"':'').'">'; print '
'.$langs->trans("Location").''.$object->location.'


'; - // Assigned to print ''; + print '
'.$langs->trans("ActionAffectedTo").''; if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1); print '


'; + // Busy - 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%%.
'.$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 '