Debug module ticket
This commit is contained in:
parent
5bcce53e40
commit
3a2a1b4a56
@ -88,7 +88,7 @@ $hookmanager->initHooks(array('admin'));
|
|||||||
// Put here declaration of dictionaries properties
|
// Put here declaration of dictionaries properties
|
||||||
|
|
||||||
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
||||||
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,37,0,25,0);
|
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,37,0,25,0);
|
||||||
|
|
||||||
// Name of SQL tables of dictionaries
|
// Name of SQL tables of dictionaries
|
||||||
$tabname=array();
|
$tabname=array();
|
||||||
|
|||||||
@ -299,9 +299,9 @@ class FormTicket
|
|||||||
print $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
|
print $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Category
|
// Group
|
||||||
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">' . $langs->trans("TicketCategory") . '</span></label></td><td>';
|
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">' . $langs->trans("TicketGroup") . '</span></label></td><td>';
|
||||||
print $this->selectAnalyticCodesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
|
print $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Notify thirdparty at creation
|
// Notify thirdparty at creation
|
||||||
@ -532,7 +532,7 @@ class FormTicket
|
|||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function selectAnalyticCodesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
|
public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
|
||||||
{
|
{
|
||||||
global $langs, $user;
|
global $langs, $user;
|
||||||
|
|
||||||
|
|||||||
@ -231,23 +231,9 @@ class modTicket extends DolibarrModules
|
|||||||
'titre' => 'List',
|
'titre' => 'List',
|
||||||
'mainmenu' => 'ticket',
|
'mainmenu' => 'ticket',
|
||||||
'leftmenu' => 'ticketlist',
|
'leftmenu' => 'ticketlist',
|
||||||
'url' => '/ticket/list.php',
|
|
||||||
'langs' => 'ticket',
|
|
||||||
'position' => 103,
|
|
||||||
'enabled' => '$conf->ticket->enabled',
|
|
||||||
'perms' => '$user->rights->ticket->read',
|
|
||||||
'target' => '',
|
|
||||||
'user' => 2);
|
|
||||||
$r++;
|
|
||||||
|
|
||||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticketlist',
|
|
||||||
'type' => 'left',
|
|
||||||
'titre' => 'MenuListNonClosed',
|
|
||||||
'mainmenu' => 'ticket',
|
|
||||||
'leftmenu' => 'ticketlist',
|
|
||||||
'url' => '/ticket/list.php?search_fk_status=non_closed',
|
'url' => '/ticket/list.php?search_fk_status=non_closed',
|
||||||
'langs' => 'ticket',
|
'langs' => 'ticket',
|
||||||
'position' => 104,
|
'position' => 103,
|
||||||
'enabled' => '$conf->ticket->enabled',
|
'enabled' => '$conf->ticket->enabled',
|
||||||
'perms' => '$user->rights->ticket->read',
|
'perms' => '$user->rights->ticket->read',
|
||||||
'target' => '',
|
'target' => '',
|
||||||
@ -259,7 +245,7 @@ class modTicket extends DolibarrModules
|
|||||||
'titre' => 'MenuTicketMyAssign',
|
'titre' => 'MenuTicketMyAssign',
|
||||||
'mainmenu' => 'ticket',
|
'mainmenu' => 'ticket',
|
||||||
'leftmenu' => 'ticketmy',
|
'leftmenu' => 'ticketmy',
|
||||||
'url' => '/ticket/list.php?mode=my_assign',
|
'url' => '/ticket/list.php?mode=mine&search_fk_status=non_closed',
|
||||||
'langs' => 'ticket',
|
'langs' => 'ticket',
|
||||||
'position' => 105,
|
'position' => 105,
|
||||||
'enabled' => '$conf->ticket->enabled',
|
'enabled' => '$conf->ticket->enabled',
|
||||||
@ -268,19 +254,6 @@ class modTicket extends DolibarrModules
|
|||||||
'user' => 0);
|
'user' => 0);
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticketmy',
|
|
||||||
'type' => 'left',
|
|
||||||
'titre' => 'MenuTicketMyAssignNonClosed',
|
|
||||||
'mainmenu' => 'ticket',
|
|
||||||
'url' => '/ticket/list.php?mode=my_assign&search_fk_status=non_closed',
|
|
||||||
'langs' => 'ticket',
|
|
||||||
'position' => 106,
|
|
||||||
'enabled' => '$conf->ticket->enabled',
|
|
||||||
'perms' => '$user->rights->ticket->read',
|
|
||||||
'target' => '',
|
|
||||||
'user' => 0);
|
|
||||||
$r++;
|
|
||||||
|
|
||||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Statistics',
|
'titre' => 'Statistics',
|
||||||
|
|||||||
@ -904,13 +904,13 @@ DictionaryRevenueStamp=Amount of tax stamps
|
|||||||
DictionaryPaymentConditions=Payment Terms
|
DictionaryPaymentConditions=Payment Terms
|
||||||
DictionaryPaymentModes=Payment Modes
|
DictionaryPaymentModes=Payment Modes
|
||||||
DictionaryTypeContact=Contact/Address types
|
DictionaryTypeContact=Contact/Address types
|
||||||
DictionaryTypeOfContainer=Type of website pages/containers
|
DictionaryTypeOfContainer=Website - Type of website pages/containers
|
||||||
DictionaryEcotaxe=Ecotax (WEEE)
|
DictionaryEcotaxe=Ecotax (WEEE)
|
||||||
DictionaryPaperFormat=Paper formats
|
DictionaryPaperFormat=Paper formats
|
||||||
DictionaryFormatCards=Card formats
|
DictionaryFormatCards=Card formats
|
||||||
DictionaryFees=Expense report - Types of expense report lines
|
DictionaryFees=Expense report - Types of expense report lines
|
||||||
DictionarySendingMethods=Shipping methods
|
DictionarySendingMethods=Shipping methods
|
||||||
DictionaryStaff=No. of Employees
|
DictionaryStaff=Number of Employees
|
||||||
DictionaryAvailability=Delivery delay
|
DictionaryAvailability=Delivery delay
|
||||||
DictionaryOrderMethods=Ordering methods
|
DictionaryOrderMethods=Ordering methods
|
||||||
DictionarySource=Origin of proposals/orders
|
DictionarySource=Origin of proposals/orders
|
||||||
|
|||||||
@ -492,6 +492,8 @@ Drafts=Drafts
|
|||||||
StatusInterInvoiced=Invoiced
|
StatusInterInvoiced=Invoiced
|
||||||
Validated=Validated
|
Validated=Validated
|
||||||
Opened=Open
|
Opened=Open
|
||||||
|
OpenAll=Open (All)
|
||||||
|
ClosedAll=Closed (All)
|
||||||
New=New
|
New=New
|
||||||
Discount=Discount
|
Discount=Discount
|
||||||
Unknown=Unknown
|
Unknown=Unknown
|
||||||
|
|||||||
@ -27,9 +27,9 @@ Permission56003=Delete tickets
|
|||||||
Permission56004=Manage tickets
|
Permission56004=Manage tickets
|
||||||
Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on)
|
Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on)
|
||||||
|
|
||||||
TicketDictType=Tickets type
|
TicketDictType=Ticket - Types
|
||||||
TicketDictCategory=Tickets analytic code
|
TicketDictCategory=Ticket - Groupes
|
||||||
TicketDictSeverity=Tickets severity
|
TicketDictSeverity=Ticket - Severities
|
||||||
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
||||||
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
||||||
TicketTypeShortCOM=Commercial question
|
TicketTypeShortCOM=Commercial question
|
||||||
@ -123,13 +123,14 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket
|
|||||||
TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket.
|
TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket.
|
||||||
TicketNumberingModules=Tickets numbering module
|
TicketNumberingModules=Tickets numbering module
|
||||||
TicketNotifyTiersAtCreation=Notify third party at creation
|
TicketNotifyTiersAtCreation=Notify third party at creation
|
||||||
|
TicketGroup=Group
|
||||||
|
|
||||||
#
|
#
|
||||||
# Index & list page
|
# Index & list page
|
||||||
#
|
#
|
||||||
TicketsIndex=Ticket - home
|
TicketsIndex=Ticket - home
|
||||||
TicketList=List of tickets
|
TicketList=List of tickets
|
||||||
TicketAssignedToMeInfos=This page display ticket list which are assigned to current user
|
TicketAssignedToMeInfos=This page display ticket list created by or assigned to current user
|
||||||
NoTicketsFound=No ticket found
|
NoTicketsFound=No ticket found
|
||||||
TicketViewAllTickets=View all tickets
|
TicketViewAllTickets=View all tickets
|
||||||
TicketViewNonClosedOnly=View only open tickets
|
TicketViewNonClosedOnly=View only open tickets
|
||||||
|
|||||||
@ -27,9 +27,9 @@ Permission56003=Supprimer tickets
|
|||||||
Permission56004=Gérer les tickets
|
Permission56004=Gérer les tickets
|
||||||
Permission56005=Voir les tickets de tous les tiers (sauf pour les utilisateurs externes, toujours limité au tiers dont ils dépendent)
|
Permission56005=Voir les tickets de tous les tiers (sauf pour les utilisateurs externes, toujours limité au tiers dont ils dépendent)
|
||||||
|
|
||||||
TicketDictType=Type de ticket
|
TicketDictType=Ticket - Types
|
||||||
TicketDictCategory=Catégories de tickets
|
TicketDictCategory=Ticket - Groupes
|
||||||
TicketDictSeverity=Sévérité des tickets
|
TicketDictSeverity=Ticket - Sévérités
|
||||||
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
||||||
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
||||||
TicketTypeShortCOM=Question commerciale
|
TicketTypeShortCOM=Question commerciale
|
||||||
|
|||||||
@ -471,7 +471,7 @@ if ($action == "view_ticketlist")
|
|||||||
|
|
||||||
if (!empty($arrayfields['category.code']['checked'])) {
|
if (!empty($arrayfields['category.code']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$formTicket->selectAnalyticCodesTickets($search_category, 'search_category', '', 2, 1, 1);
|
$formTicket->selectGroupTickets($search_category, 'search_category', '', 2, 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2176,7 +2176,7 @@ class Societe extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result.=$linkstart;
|
$result.=$linkstart;
|
||||||
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valigntextbottom"'), 0, 0, $notooltip?0:1);
|
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip valignmiddle"'), 0, 0, $notooltip?0:1);
|
||||||
if ($withpicto != 2) $result.=($maxlen?dol_trunc($name, $maxlen):$name);
|
if ($withpicto != 2) $result.=($maxlen?dol_trunc($name, $maxlen):$name);
|
||||||
$result.=$linkend;
|
$result.=$linkend;
|
||||||
|
|
||||||
|
|||||||
@ -949,6 +949,7 @@ select.selectarrowonleft option {
|
|||||||
.width100 { width: 100px; }
|
.width100 { width: 100px; }
|
||||||
.width200 { width: 200px; }
|
.width200 { width: 200px; }
|
||||||
.minwidth100 { min-width: 100px; }
|
.minwidth100 { min-width: 100px; }
|
||||||
|
.minwidth150 { min-width: 150px; }
|
||||||
.minwidth200 { min-width: 200px; }
|
.minwidth200 { min-width: 200px; }
|
||||||
.minwidth300 { min-width: 300px; }
|
.minwidth300 { min-width: 300px; }
|
||||||
.minwidth400 { min-width: 400px; }
|
.minwidth400 { min-width: 400px; }
|
||||||
@ -966,6 +967,7 @@ select.selectarrowonleft option {
|
|||||||
.width50 { width: 50px; }
|
.width50 { width: 50px; }
|
||||||
.width75 { width: 75px; }
|
.width75 { width: 75px; }
|
||||||
.width100 { width: 100px; }
|
.width100 { width: 100px; }
|
||||||
|
.width150 { width: 150px; }
|
||||||
.width200 { width: 200px; }
|
.width200 { width: 200px; }
|
||||||
.maxwidth25 { max-width: 25px; }
|
.maxwidth25 { max-width: 25px; }
|
||||||
.maxwidth50 { max-width: 50px; }
|
.maxwidth50 { max-width: 50px; }
|
||||||
|
|||||||
@ -919,6 +919,7 @@ select.selectarrowonleft option {
|
|||||||
.width100 { width: 100px; }
|
.width100 { width: 100px; }
|
||||||
.width200 { width: 200px; }
|
.width200 { width: 200px; }
|
||||||
.minwidth100 { min-width: 100px; }
|
.minwidth100 { min-width: 100px; }
|
||||||
|
.minwidth150 { min-width: 150px; }
|
||||||
.minwidth200 { min-width: 200px; }
|
.minwidth200 { min-width: 200px; }
|
||||||
.minwidth300 { min-width: 300px; }
|
.minwidth300 { min-width: 300px; }
|
||||||
.minwidth400 { min-width: 400px; }
|
.minwidth400 { min-width: 400px; }
|
||||||
@ -933,10 +934,10 @@ select.selectarrowonleft option {
|
|||||||
}
|
}
|
||||||
.widthauto { width: auto; }
|
.widthauto { width: auto; }
|
||||||
.width25 { width: 25px; }
|
.width25 { width: 25px; }
|
||||||
.width75 { width: 75px; }
|
|
||||||
.width50 { width: 50px; }
|
.width50 { width: 50px; }
|
||||||
.width75 { width: 75px; }
|
.width75 { width: 75px; }
|
||||||
.width100 { width: 100px; }
|
.width100 { width: 100px; }
|
||||||
|
.width150 { width: 150px; }
|
||||||
.width200 { width: 200px; }
|
.width200 { width: 200px; }
|
||||||
.maxwidth25 { max-width: 25px; }
|
.maxwidth25 { max-width: 25px; }
|
||||||
.maxwidth50 { max-width: 50px; }
|
.maxwidth50 { max-width: 50px; }
|
||||||
|
|||||||
@ -322,12 +322,12 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
{
|
{
|
||||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' ';
|
||||||
if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->societe_id && $user->rights->ticket->write) {
|
if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->societe_id && $user->rights->ticket->write) {
|
||||||
$morehtmlref.='<a href="' . $url_page_current . '?action=editcustomer&track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a> : ';
|
$morehtmlref.='<a href="' . $url_page_current . '?action=editcustomer&track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 0) . '</a> : ';
|
||||||
}
|
}
|
||||||
if ($action == 'editcustomer') {
|
if ($action == 'editcustomer') {
|
||||||
$morehtmlref.=$form->form_thirdparty($url_page_current . '?track_id=' . $object->track_id, $object->socid, 'editcustomer', '', 1, 0, 0, array(), 1);
|
$morehtmlref.=$form->form_thirdparty($url_page_current . '?track_id=' . $object->track_id, $object->socid, 'editcustomer', '', 1, 0, 0, array(), 1);
|
||||||
} else {
|
} else {
|
||||||
$morehtmlref.=$form->form_thirdparty($url_page_current . '?track_id=' . $object->track_id, $object->socid, 'none', '', 1, 0, 0, array(), 1);
|
$morehtmlref.=$form->form_thirdparty($url_page_current . '?track_id=' . $object->track_id, $object->socid, 'none', '', 1, 0, 0, array(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,7 +551,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $langs->trans('TicketChangeCategory');
|
print $langs->trans('TicketChangeCategory');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formticket->selectAnalyticCodesTickets($object->category_code, 'update_value_category', '', 2);
|
print $formticket->selectGroupTickets($object->category_code, 'update_value_category', '', 2);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
@ -571,8 +571,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
}*/
|
}*/
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Category
|
// Group
|
||||||
print '<tr><td>' . $langs->trans("AnalyticCode") . '</td><td>';
|
print '<tr><td>' . $langs->trans("TicketGroup") . '</td><td>';
|
||||||
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
||||||
/*if ($user->admin && !$noadmininfo) {
|
/*if ($user->admin && !$noadmininfo) {
|
||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
|
|||||||
@ -186,7 +186,7 @@ class Ticket extends CommonObject
|
|||||||
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object"),
|
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object"),
|
||||||
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>""),
|
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>""),
|
||||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||||
'category_code' => array('type'=>'varchar(32)', 'label'=>'Category', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||||
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty"),
|
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty"),
|
||||||
'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1),
|
'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1),
|
||||||
|
|||||||
@ -354,8 +354,8 @@ if ($result) {
|
|||||||
print $objp->severity_label;
|
print $objp->severity_label;
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap right">';
|
||||||
print $tickesupstatic->getLibStatut(3);
|
print $tickesupstatic->getLibStatut(5);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -82,6 +82,8 @@ $search_array_options=$extrafields->getOptionalsFromPost($object->table_element,
|
|||||||
if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
|
|
||||||
|
if (GETPOST('search_fk_status','alpha') == 'non_closed') $_GET['search_fk_statut'][]='openall'; // For backward compatibility
|
||||||
|
|
||||||
// Initialize array of search criterias
|
// Initialize array of search criterias
|
||||||
$search_all=trim(GETPOST("search_all", 'alpha'));
|
$search_all=trim(GETPOST("search_all", 'alpha'));
|
||||||
$search=array();
|
$search=array();
|
||||||
@ -211,11 +213,15 @@ $sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
|||||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
|
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||||
if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity($object->element).")";
|
if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity($object->element).")";
|
||||||
else $sql.=" WHERE 1 = 1";
|
else $sql.=" WHERE 1 = 1";
|
||||||
|
|
||||||
foreach($search as $key => $val)
|
foreach($search as $key => $val)
|
||||||
{
|
{
|
||||||
if ($key == 'fk_statut')
|
if ($key == 'fk_statut')
|
||||||
{
|
{
|
||||||
if ($search_fk_status == 'non_closed') $sql.= " AND ".$key." IN (0, 1, 3, 4, 5, 6)";
|
$tmpstatus='';
|
||||||
|
if ($search['fk_statut'] == 'openall' || in_array('openall', $search['fk_statut'])) $tmpstatus.=($tmpstatus?',':'')."'0', '1', '3', '4', '5', '6'";
|
||||||
|
if ($search['fk_statut'] == 'closeall' || in_array('closeall', $search['fk_statut'])) $tmpstatus.=($tmpstatus?',':'')."'8', '9'";
|
||||||
|
if ($tmpstatus) $sql.=" AND fk_statut IN (".$tmpstatus.")";
|
||||||
elseif (is_array($search[$key]) && count($search[$key])) $sql.=natural_search($key, join(',', $search[$key]), 2);
|
elseif (is_array($search[$key]) && count($search[$key])) $sql.=natural_search($key, join(',', $search[$key]), 2);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -225,8 +231,10 @@ foreach($search as $key => $val)
|
|||||||
if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all);
|
if ($search_all) $sql.= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||||
if ($search_fk_soc) $sql.= natural_search('fk_soc', $search_fk_soc, 2);
|
if ($search_fk_soc) $sql.= natural_search('fk_soc', $search_fk_soc, 2);
|
||||||
if ($search_fk_project) $sql.= natural_search('fk_project', $search_fk_project, 2);
|
if ($search_fk_project) $sql.= natural_search('fk_project', $search_fk_project, 2);
|
||||||
if (!$user->societe_id && ($mode == "my_assign" || (!$user->admin && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY))) {
|
if (! $user->societe_id && ($mode == "mine" || (!$user->admin && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY))) {
|
||||||
$sql.= " AND t.fk_user_assign=".$user->id;
|
$sql.= " AND (t.fk_user_assign = ".$user->id;
|
||||||
|
if (empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) $sql.=" OR t.fk_user_create = ".$user->id;
|
||||||
|
$sql.=")";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add where from extra fields
|
// Add where from extra fields
|
||||||
@ -461,7 +469,7 @@ if ($user->rights->ticket->write)
|
|||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_ticket', 0, $newcardbutton, '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_ticket', 0, $newcardbutton, '', $limit);
|
||||||
|
|
||||||
if ($mode == 'my_assign') {
|
if ($mode == 'mine') {
|
||||||
print '<div class="opacitymedium">' . $langs->trans('TicketAssignedToMeInfos') . '</div><br>';
|
print '<div class="opacitymedium">' . $langs->trans('TicketAssignedToMeInfos') . '</div><br>';
|
||||||
}
|
}
|
||||||
// Add code for pre mass action (confirmation or email presend form)
|
// Add code for pre mass action (confirmation or email presend form)
|
||||||
@ -477,17 +485,6 @@ if ($sall)
|
|||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'</div>';
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
|
||||||
if ($search_fk_status == 'non_closed') {
|
|
||||||
print '<div class="divsearchfield"><a href="' . $url_page_current . '?search_fk_status=-1' . ($projectid ? '&projectid='.$projectid : 0) . ($socid ? '&socid=' . $socid : '') . '">' . $langs->trans('TicketViewAllTickets') . '</a></div>';
|
|
||||||
$param .= '&search_fk_status=non_closed';
|
|
||||||
} else {
|
|
||||||
print '<div class="divsearchfield"><a href="' . $url_page_current . '?search_fk_status=non_closed' . ($projectid ? '&projectid='.$projectid : 0) . ($socid ? '&socid=' . $socid : '') . '">' . $langs->trans('TicketViewNonClosedOnly') . '</a></div>';
|
|
||||||
$param .= '&search_fk_status=-1';
|
|
||||||
}
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
/*$moreforfilter.='<div class="divsearchfield">';
|
/*$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||||
@ -525,19 +522,31 @@ foreach($object->fields as $key => $val)
|
|||||||
if (! empty($arrayfields['t.'.$key]['checked'])) {
|
if (! empty($arrayfields['t.'.$key]['checked'])) {
|
||||||
if ($key == 'type_code') {
|
if ($key == 'type_code') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
$formTicket->selectTypesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth200'));
|
$formTicket->selectTypesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth150'));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($key == 'category_code') {
|
} elseif ($key == 'category_code') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
$formTicket->selectAnalyticCodesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth200'));
|
$formTicket->selectGroupTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth150'));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($key == 'severity_code') {
|
} elseif ($key == 'severity_code') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
$formTicket->selectSeveritiesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth200'));
|
$formTicket->selectSeveritiesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth150'));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
} elseif ($key == 'fk_user_assign') {
|
||||||
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
|
print $form->select_dolusers($search[$key], 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css']?$val['css']:'maxwidth150'));
|
||||||
|
print '</td>';
|
||||||
} elseif ($key == 'fk_statut') {
|
} elseif ($key == 'fk_statut') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
$arrayofstatus = array();
|
||||||
print Form::multiselectarray('search_fk_statut', $object->statuts_short, $search[$key], 0, 0, '', 1, 0, '', '', '');
|
$arrayofstatus['openall']='-- '.$langs->trans('OpenAll').' --';
|
||||||
|
foreach ($object->statuts_short as $key2 => $val2)
|
||||||
|
{
|
||||||
|
$arrayofstatus[$key2] = $val2;
|
||||||
|
if ($key2 == '6') $arrayofstatus['closeall']='-- '.$langs->trans('ClosedAll').' --';
|
||||||
|
}
|
||||||
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
|
//var_dump($arrayofstatus);var_dump($search['fk_statut']);var_dump(array_values($search[$key]));
|
||||||
|
print Form::multiselectarray('search_fk_statut', $arrayofstatus, array_values($search[$key]), 0, 0, 'minwidth150', 1, 0, '', '', '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -610,6 +619,7 @@ while ($i < min($num, $limit))
|
|||||||
{
|
{
|
||||||
if (isset($obj->$key)) $object->$key = $obj->$key;
|
if (isset($obj->$key)) $object->$key = $obj->$key;
|
||||||
}
|
}
|
||||||
|
$langs->load("ticket");
|
||||||
|
|
||||||
// Show here line of result
|
// Show here line of result
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -629,7 +639,8 @@ while ($i < min($num, $limit))
|
|||||||
print $val['css'];
|
print $val['css'];
|
||||||
if ($cssforfield || $val['css']) print '"';
|
if ($cssforfield || $val['css']) print '"';
|
||||||
print '>';
|
print '>';
|
||||||
print $object->showOutputField($val, $key, $obj->$key, '');
|
if ($key == 'fk_statut') print $object->getLibStatut(5);
|
||||||
|
else print $object->showOutputField($val, $key, $obj->$key, '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! empty($val['isameasure']))
|
if (! empty($val['isameasure']))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user