|
@@ -205,7 +205,7 @@ if (empty($reshook)) {
|
|
|
$fk_user_assign = GETPOST("fk_user_assign", 'int');
|
|
|
if ($fk_user_assign > 0) {
|
|
|
$object->fk_user_assign = $fk_user_assign;
|
|
|
- $object->fk_statut = $object::STATUS_ASSIGNED;
|
|
|
+ $object->fk_status = $object::STATUS_ASSIGNED;
|
|
|
}
|
|
|
|
|
|
$object->fk_project = $projectid;
|
|
@@ -285,7 +285,7 @@ if (empty($reshook)) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if ($action == 'update' && $user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) {
|
|
|
+ if ($action == 'update' && $user->rights->ticket->write && $object->fk_status < Ticket::STATUS_CLOSED) {
|
|
|
$error = 0;
|
|
|
|
|
|
$ret = $object->fetch(GETPOST('id', 'int'), GETPOST('ref', 'alpha'), GETPOST('track_id', 'alpha'));
|
|
@@ -543,7 +543,7 @@ if (empty($reshook)) {
|
|
|
if ($action == 'confirm_reopen' && $user->rights->ticket->manage && !GETPOST('cancel')) {
|
|
|
if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
|
|
// prevent browser refresh from reopening ticket several times
|
|
|
- if ($object->fk_statut == Ticket::STATUS_CLOSED || $object->fk_statut == Ticket::STATUS_CANCELED) {
|
|
|
+ if ($object->fk_status == Ticket::STATUS_CLOSED || $object->fk_status == Ticket::STATUS_CANCELED) {
|
|
|
$res = $object->setStatut(Ticket::STATUS_ASSIGNED);
|
|
|
if ($res) {
|
|
|
// Log action in ticket logs table
|
|
@@ -602,7 +602,7 @@ if (empty($reshook)) {
|
|
|
// Reopen ticket
|
|
|
if ($object->fetch(GETPOST('id', 'int'), GETPOST('track_id', 'alpha')) >= 0) {
|
|
|
$new_status = GETPOST('new_status', 'int');
|
|
|
- $old_status = $object->fk_statut;
|
|
|
+ $old_status = $object->fk_status;
|
|
|
$res = $object->setStatut($new_status);
|
|
|
if ($res) {
|
|
|
// Log action in ticket logs table
|
|
@@ -721,7 +721,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
$formticket->withcancel = 1;
|
|
|
|
|
|
$formticket->showForm(1, 'create', 0);
|
|
|
- /*} elseif ($action == 'edit' && $user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) {
|
|
|
+ /*} elseif ($action == 'edit' && $user->rights->ticket->write && $object->fk_status < Ticket::STATUS_CLOSED) {
|
|
|
$formticket = new FormTicket($db);
|
|
|
|
|
|
$head = ticket_prepare_head($object);
|
|
@@ -934,7 +934,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
// Thirdparty
|
|
|
if (!empty($conf->societe->enabled)) {
|
|
|
$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' ';
|
|
|
- if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) {
|
|
|
+ if ($action != 'editcustomer' && $object->fk_status < 8 && !$user->socid && $user->rights->ticket->write) {
|
|
|
$morehtmlref .= '<a class="editfielda" href="'.$url_page_current.'?action=editcustomer&token='.newToken().'&track_id='.$object->track_id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 0).'</a> : ';
|
|
|
}
|
|
|
if ($action == 'editcustomer') {
|
|
@@ -1034,7 +1034,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
print '<tr><td>';
|
|
|
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
|
|
print $langs->trans("AssignedTo");
|
|
|
- if ($object->fk_statut < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) {
|
|
|
+ if ($object->fk_status < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) {
|
|
|
print '</td><td class="right"><a class="editfielda" href="'.$url_page_current.'?track_id='.$object->track_id.'&action=view&set=assign_ticket">'.img_edit($langs->trans('Modify'), '').'</a>';
|
|
|
}
|
|
|
print '</td></tr></table>';
|
|
@@ -1045,7 +1045,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
}
|
|
|
|
|
|
// Show user list to assignate one if status is "read"
|
|
|
- if (GETPOST('set', 'alpha') == "assign_ticket" && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) {
|
|
|
+ if (GETPOST('set', 'alpha') == "assign_ticket" && $object->fk_status < 8 && !$user->socid && $user->rights->ticket->write) {
|
|
|
print '<form method="post" name="ticket" enctype="multipart/form-data" action="'.$url_page_current.'">';
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
|
print '<input type="hidden" name="action" value="assign_user">';
|
|
@@ -1062,7 +1062,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
print '<table class="nobordernopadding centpercent"><tr><td class="nowrap">';
|
|
|
print $langs->trans('Progression').'</td><td class="left">';
|
|
|
print '</td>';
|
|
|
- if ($action != 'progression' && $object->fk_statut < $object::STATUS_CLOSED && !$user->socid) {
|
|
|
+ if ($action != 'progression' && $object->fk_status < $object::STATUS_CLOSED && !$user->socid) {
|
|
|
print '<td class="right"><a class="editfielda" href="'.$url_page_current.'?action=progression&track_id='.$object->track_id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
|
|
|
}
|
|
|
print '</tr></table>';
|
|
@@ -1185,7 +1185,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
print '<input type="submit" class="button small" name="btn_update_ticket_prop" value="'.$langs->trans("Modify").'" />';
|
|
|
} else {
|
|
|
// Button to edit Properties
|
|
|
- if ($object->fk_statut < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) {
|
|
|
+ if ($object->fk_status < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) {
|
|
|
print ' <a class="editfielda" href="card.php?track_id='.$object->track_id.'&action=view&set=properties">'.img_edit($langs->trans('Modify')).'</a>';
|
|
|
}
|
|
|
}
|
|
@@ -1244,7 +1244,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
|
|
|
// Display navbar with links to change ticket status
|
|
|
print '<!-- navbar with status -->';
|
|
|
- if (!$user->socid && $user->rights->ticket->write && $object->fk_statut < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') {
|
|
|
+ if (!$user->socid && $user->rights->ticket->write && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') {
|
|
|
$actionobject->viewStatusActions($object);
|
|
|
}
|
|
|
|
|
@@ -1380,7 +1380,7 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
|
|
|
if (empty($reshook)) {
|
|
|
// Show link to add a message (if read and not closed)
|
|
|
- if ($object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") {
|
|
|
+ if ($object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") {
|
|
|
print dolGetButtonAction('', $langs->trans('TicketAddMessage'), 'default', $_SERVER["PHP_SELF"].'?action=presend_addmessage&mode=init&token='.newToken().'&track_id='.$object->track_id, '');
|
|
|
}
|
|
|
|
|
@@ -1389,28 +1389,28 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
if (!$object->fk_soc && $user->rights->ficheinter->creer) {
|
|
|
print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
|
|
|
}
|
|
|
- if ($object->fk_soc > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) {
|
|
|
+ if ($object->fk_soc > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) {
|
|
|
print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='. $object->fk_soc.'&origin=ticket_ticket&originid='. $object->id, '');
|
|
|
}
|
|
|
|
|
|
/* This is useless. We can already modify each field individually
|
|
|
- if ($user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) {
|
|
|
+ if ($user->rights->ticket->write && $object->fk_status < Ticket::STATUS_CLOSED) {
|
|
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?track_id='.$object->track_id.'&action=edit&token='.newToken().'">'.$langs->trans('Modify').'</a></div>';
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
// Close ticket if statut is read
|
|
|
- if ($object->fk_statut > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ticket->write) {
|
|
|
+ if ($object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) {
|
|
|
print dolGetButtonAction('', $langs->trans('CloseTicket'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&track_id='.$object->track_id, '');
|
|
|
}
|
|
|
|
|
|
// Abadon ticket if statut is read
|
|
|
- if ($object->fk_statut > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ticket->write) {
|
|
|
+ if ($object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) {
|
|
|
print dolGetButtonAction('', $langs->trans('AbandonTicket'), 'default', $_SERVER["PHP_SELF"].'?action=abandon&token='.newToken().'&track_id='.$object->track_id, '');
|
|
|
}
|
|
|
|
|
|
// Re-open ticket
|
|
|
- if (!$user->socid && ($object->fk_statut == Ticket::STATUS_CLOSED || $object->fk_statut == Ticket::STATUS_CANCELED) && !$user->socid) {
|
|
|
+ if (!$user->socid && ($object->fk_status == Ticket::STATUS_CLOSED || $object->fk_status == Ticket::STATUS_CANCELED) && !$user->socid) {
|
|
|
print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&track_id='.$object->track_id, '');
|
|
|
}
|
|
|
|
|
@@ -1514,12 +1514,12 @@ if ($action == 'create' || $action == 'presend') {
|
|
|
$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1);
|
|
|
|
|
|
// Show link to add a message (if read and not closed)
|
|
|
- $btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage" && $action != "add_message";
|
|
|
+ $btnstatus = $object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage" && $action != "add_message";
|
|
|
$url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init';
|
|
|
$morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus);
|
|
|
|
|
|
// Show link to add event (if read and not closed)
|
|
|
- $btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage" && $action != "add_message"; ;
|
|
|
+ $btnstatus = $object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage" && $action != "add_message"; ;
|
|
|
$url = dol_buildpath('/comm/action/card.php', 1).'?action=create&datep='.date('YmdHi').'&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id);
|
|
|
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus);
|
|
|
|