Second closing status

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Second closing status

Post by Noke101 »

Script URL: local
Version of script: 3.2.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hello everyone.
Can anyone tell me how to make the second closing status?

For example, the status ".resolved" - closes the ticket as resolved.
I named the status ".onhold" - as rejected and I want this status to also close the ticket.

I set up a filter on the main ticket page so that it doesn't show me tickets with ".onhold" status.
But when I have a ticket with this status, then a notice appears on the list of tickets that I have unclosed tickets that I can't see because of the filter.

Where it is necessary to change the logic of functions so that the ".onhold" status also closes the ticket :?:
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Second closing status

Post by Noke101 »

Code: Select all

function hesk_get_status_select($ignore_status = '', $can_resolve = true, $select_status = '')
{
    global $hesk_settings;

    $options = '';
    $last = '';

    foreach ($hesk_settings['statuses'] as $k => $v)
    {
        if ($k === $ignore_status)
        {
            continue;
        }
        elseif ($k == 3)
        {
            if ($can_resolve)
            {
                $last = '<option value="'.$k.'" '.($k == $select_status ? 'selected' : '').'>'.$v['name'].'</option>';
            }
        }
        else
        {
            $options .= '<option value="'.$k.'" '.($k == $select_status ? 'selected' : '').'>'.$v['name'].'</option>';
        }
    }

    return $options . $last;

} // END hesk_get_status_select()

I found this code in inc/statuses.inc.php.
I'm not good at logical expressions.

Tell me what to write here "elseif ($k == 3)"
so that the expression looks like - Equals 3 or 5.
status ".onhold" has ID 5
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Second closing status

Post by Noke101 »

Hello, please tell me how can i do this? Very necessary.
Post Reply