Client can't choose "Critical" priority

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Spyze
Posts: 7
Joined: Sun Mar 14, 2021 12:04 am

Client can't choose "Critical" priority

Post 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.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Client can't choose "Critical" priority

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Spyze
Posts: 7
Joined: Sun Mar 14, 2021 12:04 am

Re: Client can't choose "Critical" priority

Post 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?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Client can't choose "Critical" priority

Post by Klemen »

Sorry, the value should be 0 (I modified my original reply now)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Spyze
Posts: 7
Joined: Sun Mar 14, 2021 12:04 am

Re: Client can't choose "Critical" priority

Post by Spyze »

Now it's changing to low :roll:
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Client can't choose "Critical" priority

Post by Klemen »

Maybe you have wrong option value in /theme/hesk3/customer/create-ticket/create-ticket.php ?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Spyze
Posts: 7
Joined: Sun Mar 14, 2021 12:04 am

Re: Client can't choose "Critical" priority

Post 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)?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Client can't choose "Critical" priority

Post by Klemen »

Yes, you should :)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Spyze
Posts: 7
Joined: Sun Mar 14, 2021 12:04 am

Re: Client can't choose "Critical" priority

Post by Spyze »

Now everything works fine, thanks! :D
Post Reply