Remove Reply When New Ticket is Submitted

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
SupportCenter
Posts: 65
Joined: Sat Aug 15, 2009 9:38 pm

Remove Reply When New Ticket is Submitted

Post by SupportCenter »

Im using version 2.1, but already purchased 2.2.

I have it so that people cant reply to tickets and have to wait for our company to reply to them.

When a person submits a ticket, they should not be allowed to reply to the ticket until we reply back. What is happening is when a person opens a new ticket, they can reply immediately to the new ticket. After that, they cant reply until we reply back.

We would like to know to to remove this, if someone opens a ticket, we dont want them to reply back until we reply back. Right now as it stands, they can reply back when they open a new ticket. After that, they cant reply back to the ticket until we reply back to it.

Thanks again.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Remove Reply When New Ticket is Submitted

Post by Klemen »

Just below

Code: Select all

$ticket = hesk_dbFetchAssoc($result);
in ticket.php try pasting

Code: Select all

if ($ticket['status'] != 2)
{
	$ticket['locked'] = 1;
}
This should lock the ticket unless it's waiting for a customer reply.
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
SupportCenter
Posts: 65
Joined: Sat Aug 15, 2009 9:38 pm

Re: Remove Reply When New Ticket is Submitted

Post by SupportCenter »

Works Great Thank you K
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: Remove Reply When New Ticket is Submitted

Post by Raven »

This is a very logical mod on the surface but not all users will give you all the information that you need right away in their first post. Some of mine remember things after they have submitted their ticket and then add extra stuff to help..

Does make more sense though like this - and I guess if any of the HESK support staff need any further info they can always ask for it in their reply thus opening the ticket back up allowing the customer to add more replies.

I've added this to my installation of HESK and will see how things go for a while.

Thanks ;)
SupportCenter
Posts: 65
Joined: Sat Aug 15, 2009 9:38 pm

Re: Remove Reply When New Ticket is Submitted

Post by SupportCenter »

I tried the code above. and it doesnt work it allows the person to leave one more reply and then removes it once a ticket is opened.
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: Remove Reply When New Ticket is Submitted

Post by Raven »

No problems here, seems to work perfectly - are you sure you made the correct edits?
SupportCenter
Posts: 65
Joined: Sat Aug 15, 2009 9:38 pm

Re: Remove Reply When New Ticket is Submitted

Post by SupportCenter »

When the ticket is opened by a user, they can leave one more reply before the reply button is removed. I thought it was something to do with the values. I've changed them both with no avaiability.
SupportCenter
Posts: 65
Joined: Sat Aug 15, 2009 9:38 pm

Re: Remove Reply When New Ticket is Submitted

Post by SupportCenter »

IF YOU WANT THE CODE TO REALLY WORK THIS IS WHAT YOU DO. IT TOOK SOME TWEAKING BUT NOW EVERYTHING WORKS FINE. SO IF ANY ONE WANTS TO DO IT. THIS IS WHAT YOU DO.

===================================
HOW TO LIMIT NUMBER OF OPEN TICKETS
===================================

1. Locate the submit_ticket.php and below the hesk_dbConnect(); add the following line :

$sql = "SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `status` != '1' AND (`email` LIKE '".hesk_dbEscape($email)."' OR `ip` LIKE '".hesk_dbEscape($_SERVER['REMOTE_ADDR'])."')";
$res = hesk_dbQuery($sql);
if (hesk_dbNumRows($res) >= 1)
{
hesk_error("You can have maximum 1 open tickets at a time!");
}

======================================================
HOW TO LIMIT REPLIES ON TICKET TO 1
======================================================

1. In the ticket.php file change the following code from this :

$ticket['status'] != 3 || $hesk_settings['custopen']==1

To this :

if ($ticket['locked'] != 1 && $ticket['status'] != 1 && $ticket['status'] != 1)

===========================================================
REMOVE THE REPLY BUTTON WHEN TICKET IS FIRST OPENED BY USER
===========================================================

1. Open the ticket.php file and locate the following line :

$ticket = hesk_dbFetchAssoc($result);

2. Just below the above line add the following :

if ($ticket['status'] != 1)
{
$ticket['locked'] = 1;
}
mubdea
Posts: 10
Joined: Sat Apr 02, 2011 10:38 pm

Re: Remove Reply When New Ticket is Submitted

Post by mubdea »

is there any way to limit submitting ticket to 1 per session

some times the customer press the submit bottom many time and I got multiple tickets
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: Remove Reply When New Ticket is Submitted

Post by Raven »

Hi, you could use a bit of JavaScript on the forms submit button like this for example:

http://javascript.internet.com/forms/di ... ttons.html

Hope that helps ;)
Lurking
Posts: 32
Joined: Sun Nov 28, 2010 4:57 am

Re: Remove Reply When New Ticket is Submitted

Post by Lurking »

I have this script but it calls to install script in the "head" and "body" section. There is no "head" or "body" section in a PHP webpage. Anyone know which page has the submit ticket button on it? I searched this forum and the net with no results.
Post Reply