Bug #5625
ticketsolved_updatetech option
Status: | Resolved | Start date: | 06/07/2021 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | yllen | % Done: | 100% | |
Category: | - | |||
Target version: | 2.5.1 |
Description
ticketsolved_updatetech option is triggered even if state is not closed or solved
To try, enable option, from new ticket (status = new), affect a group
You will see our user assign as tech.
if ($config->getField('ticketsolved_updatetech')) { $ticket_user = new Ticket_User(); if ((!$ticket_user->getFromDBByCrit(['tickets_id' => $ticket->fields['id'], 'type' => CommonITILActor::ASSIGN]) || (isset($ticket_user->fields['users_id']) && ($ticket_user->fields['users_id'] != Session::getLoginUserID()))) && isset($ticket->oldvalues) && !in_array($ticket->oldvalues['status'], array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray())) && in_array($ticket->input['status'], array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray()))) { $ticket_user->add(['tickets_id' => $ticket->getID(), 'users_id' => Session::getLoginUserID(), 'type' => CommonITILActor::ASSIGN]); } }
The first condition trigger the behavior.
You will find attached a patch to fix the problem.
Associated revisions
fixed #5625
History
#1 Updated by yllen about 1 year ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r340.
#2 Updated by yllen about 1 year ago
- Assignee set to yllen
- Target version set to 2.5.1