Page 1 of 1

Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 12:08 am
by Spyze
As in topic - client can't choose Critical priority of ticket while creating it. We (as admins) can change it manually to critical after it is created, but client can choose only Low, Medium and High priority. Or maybe there is some hidden option which allow us to enable this priority to clients to choose? Regards.

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 7:50 am
by Klemen
This is by design; the critical priority is reserved for admins only in Hesk.

If you want your customers to be able to choose it, you will need to add another select option in
/theme/hesk3/customer/create-ticket/create-ticket.php

And 'critical' => 0, to $valid_priorities in submit_ticket.php

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 5:12 pm
by Spyze
Hi, I did it and now client can choose critical priority, but after this priority is changing to high. In submit_ticket.php both critical and high priorities has same value => 1. Is it okay?

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 5:22 pm
by Klemen
Sorry, the value should be 0 (I modified my original reply now)

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 5:32 pm
by Spyze
Now it's changing to low :roll:

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 5:51 pm
by Klemen
Maybe you have wrong option value in /theme/hesk3/customer/create-ticket/create-ticket.php ?

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 6:09 pm
by Spyze
I added this code at the botom of <select name="priority">:

Code: Select all

<option value="critical" <?php if(isset($_SESSION['c_priority']) && $_SESSION['c_priority']=='critical') {echo 'selected';} ?>>
	<?php echo $hesklang['critical']; ?>
</option>
In submit_ticket.php code looks like that:

Code: Select all

$valid_priorities = array(
        'critical' => 0,
        'high' => 1,
        'medium' => 2,
        'low' => 3
);
But shouldn't we change number 1 to 0 in if ($tmpvar['priority'] < 1 || $tmpvar['priority'] > 3)?

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 6:51 pm
by Klemen
Yes, you should :)

Re: Client can't choose "Critical" priority

Posted: Sun Mar 14, 2021 7:01 pm
by Spyze
Now everything works fine, thanks! :D