Debug v14

This commit is contained in:
Laurent Destailleur 2021-06-26 15:39:52 +02:00
parent df6d160374
commit e62ed28701
17 changed files with 110 additions and 87 deletions

View File

@ -681,7 +681,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
// Title of task
if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) {
print "<td>";
print '<td>';
if ($showlineingray) {
print '<i>';
}

View File

@ -382,6 +382,31 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
'submenus' => array(),
);
// Tickets and knwoledge base
$tmpentry = array(
'enabled'=>(!empty($conf->ticket->enabled) || !empty($conf->knwoledgemanagement->enabled)),
'perms'=>(!empty($user->rights->ticket->read) || !empty($user->rights->knwoledgemanagement->read)),
'module'=>'ticket|knwoledgemanagement'
);
$menu_arr[] = array(
'name' => 'Ticket',
'link' => '/ticket/index.php?mainmenu=ticket&amp;leftmenu=',
'title' => "Tickets",
'level' => 0,
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
'target' => $atarget,
'mainmenu' => "ticket",
'leftmenu' => '',
'position' => 88,
'id' => $id,
'idsel' => 'ticket',
'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "ticket") ? 'class="tmenusel"' : 'class="tmenu"',
'prefix' => img_picto('', 'ticket', 'class="fa-fw paddingright"'),
'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "ticket") ? 0 : 1),
'loadLangs' => array("other"),
'submenus' => array(),
);
// Tools
$tmpentry = array(
'enabled'=>1,

View File

@ -268,7 +268,7 @@ class modEventOrganization extends DolibarrModules
'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
'titre'=>'List',
'url'=>'/projet/list.php?search_usage_event_organization=1&mainmenu=project&contextpage=organizedevents',
'url'=>'/projet/list.php?search_usage_event_organization=1&search_status=99&mainmenu=project&contextpage=organizedevents',
'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.

View File

@ -261,17 +261,17 @@ class modKnowledgeManagement extends DolibarrModules
// Add here entries to declare new permissions
/* BEGIN MODULEBUILDER PERMISSIONS */
$this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used)
$this->rights[$r][1] = 'Read objects of Knowledge Management'; // Permission label
$this->rights[$r][1] = 'Read articles'; // Permission label
$this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$r++;
$this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used)
$this->rights[$r][1] = 'Create/Update objects of Knowledge Management'; // Permission label
$this->rights[$r][1] = 'Create/Update articles'; // Permission label
$this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$r++;
$this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used)
$this->rights[$r][1] = 'Delete objects of Knowledge Management'; // Permission label
$this->rights[$r][1] = 'Delete articles'; // Permission label
$this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$r++;
@ -282,6 +282,7 @@ class modKnowledgeManagement extends DolibarrModules
$r = 0;
// Add here entries to declare new menus
/* BEGIN MODULEBUILDER TOPMENU */
/*
$this->menu[$r++] = array(
'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Top menu entry
@ -297,60 +298,17 @@ class modKnowledgeManagement extends DolibarrModules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
/* END MODULEBUILDER TOPMENU */
/* BEGIN MODULEBUILDER LEFTMENU KNOWLEDGERECORD
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=knowledgemanagement', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Top menu entry
'titre'=>'KnowledgeRecord',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'knowledgemanagement',
'leftmenu'=>'knowledgerecord',
'url'=>'/knowledgemanagement/knowledgemanagementindex.php',
'langs'=>'knowledgemanagement@knowledgemanagement', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->knowledgemanagement->enabled', // Define condition to show or hide menu entry. Use '$conf->knowledgemanagement->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->knowledgemanagement->knowledgerecord->read', // Use 'perms'=>'$user->rights->knowledgemanagement->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgerecord', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
'titre'=>'List_KnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'leftmenu'=>'knowledgemanagement_knowledgerecord_list',
'url'=>'/knowledgemanagement/knowledgerecord_list.php',
'langs'=>'knowledgemanagement@knowledgemanagement', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->knowledgemanagement->enabled', // Define condition to show or hide menu entry. Use '$conf->knowledgemanagement->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'$user->rights->knowledgemanagement->knowledgerecord->read', // Use 'perms'=>'$user->rights->knowledgemanagement->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgerecord', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
'titre'=>'New_KnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'leftmenu'=>'knowledgemanagement_knowledgerecord_new',
'url'=>'/knowledgemanagement/knowledgerecord_card.php?action=create',
'langs'=>'knowledgemanagement@knowledgemanagement', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->knowledgemanagement->enabled', // Define condition to show or hide menu entry. Use '$conf->knowledgemanagement->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'$user->rights->knowledgemanagement->knowledgerecord->write', // Use 'perms'=>'$user->rights->knowledgemanagement->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
*/
/* END MODULEBUILDER TOPMENU */
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=knowledgemanagement',
'fk_menu'=>'fk_mainmenu=ticket',
// This is a Left menu entry
'type'=>'left',
'titre'=>'MenuKnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
'mainmenu'=>'ticket',
'leftmenu'=>'knowledgemanagement_knowledgerecord',
'url'=>'/knowledgemanagement/knowledgerecord_list.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@ -366,11 +324,11 @@ class modKnowledgeManagement extends DolibarrModules
);
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgemanagement_knowledgerecord',
'fk_menu'=>'fk_mainmenu=ticket,fk_leftmenu=knowledgemanagement_knowledgerecord',
// This is a Left menu entry
'type'=>'left',
'titre'=>'ListKnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'mainmenu'=>'ticket',
'leftmenu'=>'knowledgemanagement_list',
'url'=>'/knowledgemanagement/knowledgerecord_list.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@ -386,11 +344,11 @@ class modKnowledgeManagement extends DolibarrModules
);
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgemanagement_knowledgerecord',
'fk_menu'=>'fk_mainmenu=ticket,fk_leftmenu=knowledgemanagement_knowledgerecord',
// This is a Left menu entry
'type'=>'left',
'titre'=>'NewKnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'mainmenu'=>'ticket',
'leftmenu'=>'knowledgemanagement_new',
'url'=>'/knowledgemanagement/knowledgerecord_card.php?action=create',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@ -406,6 +364,7 @@ class modKnowledgeManagement extends DolibarrModules
);
/* END MODULEBUILDER LEFTMENU KNOWLEDGERECORD */
// Exports profiles provided by this module
$r = 1;
/* BEGIN MODULEBUILDER EXPORT KNOWLEDGERECORD */

View File

@ -200,7 +200,7 @@ class modTicket extends DolibarrModules
$this->menus = array(); // List of menus to add
$r = 0;
$this->menu[$r] = array('fk_menu' => 0, // Put 0 if this is a top menu
/*$this->menu[$r] = array('fk_menu' => 0, // Put 0 if this is a top menu
'type' => 'top', // This is a Top menu entry
'titre' => 'Ticket',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
@ -209,11 +209,11 @@ class modTicket extends DolibarrModules
'url' => '/ticket/index.php',
'langs' => 'ticket', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position' => 88,
'enabled' => '$conf->ticket->enabled', // Define condition to show or hide menu entry. Use '$conf->ticket->enabled' if entry must be visible if module is enabled.
'enabled' => '$conf->ticket->enabled',
'perms' => '$user->rights->ticket->read', // Use 'perms'=>'$user->rights->ticket->level1->level2' if you want your menu with a permission rules
'target' => '',
'user' => 2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$r++;*/
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket',
'type' => 'left',

View File

@ -19,7 +19,8 @@
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('COM', '10', 'Commercial question', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('HELP', '15', 'Request for functionnal help', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or problem', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or bug', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROBLEM', '22', 'Problem', 0, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('REQUEST', '25', 'Change or enhancement request', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROJECT', '30', 'Project', 0, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('OTHER', '40', 'Other', 1, 0, NULL);

View File

@ -86,6 +86,9 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', '
-- For v14
UPDATE llx_c_ticket_type set label = 'Issue or bug' WHERE code = 'ISSUE';
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROBLEM', '22', 'Problem', 0, 0, NULL);
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(64);
ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);

View File

@ -0,0 +1,9 @@
Knowledge Management base
=========================
A complete knowledge database inside your application.
Store, search and retreive any article to keep your knowledge into a database. It can be used to manage a list of FAQ, or a database
of process, or solutions of common problems.
If you are using the Ticket module, you can also link each article of your knowledge management database to the main

View File

@ -113,7 +113,7 @@ class KnowledgeRecord extends CommonObject
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflow300'),
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflow300'),
//'url' => array('type'=>'varchar(255)', 'label'=>'URL', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflow200', 'help'=>'UrlForInfoPage'),
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php', 'label'=>'TicketGroup', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory'),
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php', 'label'=>'GroupOfTicket', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory'),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Valid'),),
);
public $rowid;

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class
require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("knowledgemanagement", "other"));
$langs->loadLangs(array("knowledgemanagement", "ticket", "other"));
// Get parameters
$id = GETPOST('id', 'int');

View File

@ -37,15 +37,7 @@ About = About
KnowledgeManagementAbout = About Knowledge Management
KnowledgeManagementAboutPage = Knowledge Management about page
#
# Sample page
#
KnowledgeManagementArea = Knowledge Management
#
# Menu
#
MenuKnowledgeRecord = Knowledge base
ListKnowledgeRecord = List of articles
NewKnowledgeRecord = New article
@ -53,3 +45,5 @@ ValidateReply = Validate solution
KnowledgeRecords = Articles
KnowledgeRecord = Article
KnowledgeRecordExtraFields = Extrafields for Article
GroupOfTicket=Group of tickets
YouCanLinkArticleToATicketCategory=You can link an article to a ticket group (so the article will be suggested during qualification of new tickets)

View File

@ -34,7 +34,8 @@ TicketDictResolution=Ticket - Resolution
TicketTypeShortCOM=Commercial question
TicketTypeShortHELP=Request for functionnal help
TicketTypeShortISSUE=Issue, bug or problem
TicketTypeShortISSUE=Issue or bug
TicketTypeShortPROBLEM=Problem
TicketTypeShortREQUEST=Change or enhancement request
TicketTypeShortPROJET=Project
TicketTypeShortOTHER=Other
@ -54,14 +55,14 @@ TypeContact_ticket_internal_SUPPORTTEC=Assigned user
TypeContact_ticket_external_SUPPORTCLI=Customer contact / incident tracking
TypeContact_ticket_external_CONTRIBUTOR=External contributor
OriginEmail=Email source
OriginEmail=Email reporter
Notify_TICKET_SENTBYMAIL=Send ticket message by email
# Status
Read=Read
Assigned=Assigned
InProgress=In progress
NeedMoreInformation=Waiting for information
NeedMoreInformation=Waiting for customer feedback
Answered=Answered
Waiting=Waiting
Closed=Closed
@ -160,7 +161,7 @@ CreatedBy=Created by
NewTicket=New Ticket
SubjectAnswerToTicket=Ticket answer
TicketTypeRequest=Request type
TicketCategory=Group
TicketCategory=Ticket categorization
SeeTicket=See ticket
TicketMarkedAsRead=Ticket has been marked as read
TicketReadOn=Read on

View File

@ -174,16 +174,28 @@ foreach ($object->fields as $key => $val) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
// Add none object fields to fields for list
// Add non object fields to fields for list
$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(empty($conf->societe->enabled) ? 0 : 1));
$arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23);
$arrayfields['opp_weighted_amount'] = array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'position'=> 116, 'enabled'=>(empty($conf->global->PROJECT_USE_OPPORTUNITIES) ? 0 : 1), 'position'=>106);
// Force some fields according to search_usage filter...
if (GETPOST('search_usage_opportunity')) {
//$arrayfields['p.usage_opportunity']['visible'] = 1; // Not require, filter on search_opp_status is enough
//$arrayfields['p.usage_opportunity']['checked'] = 1; // Not require, filter on search_opp_status is enough
}
if (GETPOST('search_usage_event_organization')) {
$arrayfields['p.fk_opp_status']['enabled'] = 0;
$arrayfields['p.opp_amount']['enabled'] = 0;
$arrayfields['p.opp_percent']['enabled'] = 0;
$arrayfields['opp_weighted_amount']['enabled'] = 0;
$arrayfields['p.usage_organize_event']['visible'] = 1;
$arrayfields['p.usage_organize_event']['checked'] = 1;
}
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
/*
* Actions
*/
@ -720,6 +732,7 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">';
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";

View File

@ -614,22 +614,24 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
print '<input type="hidden" name="taskref" value="'.(GETPOSTISSET("ref") ? GETPOST("ref", 'alpha') : $defaultref).'">';
print '</td></tr>';
// Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>';
print '<input type="text" name="label" autofocus class="minwidth500 maxwidthonsmartphone" value="'.$label.'">';
print '</td></tr>';
// List of projects
// Project
print '<tr><td class="fieldrequired">'.$langs->trans("ChildOfProjectTask").'</td><td>';
print img_picto('', 'project');
$formother->selectProjectTasks(GETPOST('task_parent'), $projectid ? $projectid : $object->id, 'task_parent', 0, 0, 1, 1, 0, '0,1', 'maxwidth500');
print '</td></tr>';
// Assigned to
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
$contactsofproject = (!empty($object->id) ? $object->getListContactId('internal') : '');
if (is_array($contactsofproject) && count($contactsofproject)) {
print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300');
} else {
print $langs->trans("NoUserAssignedToTheProject");
print '<span class="opacitymedium">'.$langs->trans("NoUserAssignedToTheProject").'</span>';
}
print '</td></tr>';

View File

@ -878,8 +878,8 @@ while ($i < min($num, $limit)) {
}
// Label
if (!empty($arrayfields['t.label']['checked'])) {
print '<td>';
print $object->label;
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($object->label).'">';
print dol_escape_htmltag($object->label);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -888,7 +888,7 @@ while ($i < min($num, $limit)) {
// Description
if (!empty($arrayfields['t.description']['checked'])) {
print '<td>';
print $object->description;
print dol_escape_htmltag($object->description);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;

View File

@ -6,5 +6,5 @@ An issue tracker that provides a delicate balance between simplicity and power a
Offer your customers an easy to use interface to report and follow status of their issue. Manage your issues from
your backoffice.
By enabling the Email Collector module, you can also having your ticket created automatically from input emails.
(c) The development of this module has been initiated by the company <a href="https://librethic.io">Libr&thic</a> and is now part of Dolibarr ERP CRM core.

View File

@ -45,7 +45,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'ticketlist'; // To manage different context of search
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'tickep#selectedfieldstlist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@ -314,8 +314,7 @@ $formTicket = new FormTicket($db);
$now = dol_now();
$user_assign = new User($db);
$user_create = new User($db);
$user_temp = new User($db);
$socstatic = new Societe($db);
$help_url = '';
@ -973,8 +972,25 @@ while ($i < min($num, $limit)) {
print dol_print_date($db->jdate($obj->$key), 'dayhour', 'tzuser');
} elseif ($key == 'fk_user_create') {
if ($object->fk_user_create > 0) {
$user_create->fetch($object->fk_user_create);
print $user_create->getNomUrl(-1);
if (isset($conf->cache['user'][$object->fk_user_create])) {
$user_temp = $conf->cache['user'][$object->fk_user_create];
} else {
$user_temp = new User($db);
$user_temp->fetch($object->fk_user_create);
$conf->cache['user'][$object->fk_user_create] = $user_temp;
}
print $user_temp->getNomUrl(-1);
}
} elseif ($key == 'fk_user_assign') {
if ($object->fk_user_assign > 0) {
if (isset($conf->cache['user'][$object->fk_user_assign])) {
$user_temp = $conf->cache['user'][$object->fk_user_assign];
} else {
$user_temp = new User($db);
$user_temp->fetch($object->fk_user_assign);
$conf->cache['user'][$object->fk_user_assign] = $user_temp;
}
print $user_temp->getNomUrl(-1);
}
} elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');