Page 1 of 1

Auto close after 3 mnths

Posted: Fri Feb 19, 2010 7:31 pm
by mvraven
Script URL:
Version of script: 2.1
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:

When a client opend his/hers ticket next standing the ticketnummer there is a link to open or close the ticket. When the helpdesk closed a ticket a client can open it again to click on that link.

Is it possible that after 3 months the open link will diappear and that it not possible is anymore to open an exicting ticket at any way? And that it will be showd on the screen that the time limit is over.

Thnx!

Posted: Wed Feb 24, 2010 5:44 pm
by Klemen
You can try changing this code in ticket.php file:

Code: Select all

if ($hesk_settings['custopen'] == 1)
to something like

Code: Select all

if ($hesk_settings['custopen'] == 1 && ((time()-strtotime($ticket['dt']))/86400) < 90)
Didn't test it, but it should hide the open links from tickets older than 90 days.

Posted: Thu Feb 25, 2010 10:27 am
by mvraven
Thnx Klemen that works but....

They can still put a responce in the block and press the post reply button so the message will be send.

Is there also a possibility that the 'Post Reply' button will dissapear after 90 day's and that there then is a text 'Post Reply is not possible after 90 day's anymore'. ?

Thnx for now!

Posted: Fri Feb 26, 2010 5:33 pm
by Klemen
Also change

Code: Select all

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

Code: Select all

($ticket['status'] != 3 || ($hesk_settings['custopen'] == 1 && ((time()-strtotime($ticket['dt']))/86400) < 90) )

Posted: Fri Feb 26, 2010 6:25 pm
by mvraven
Thnx Klemen. Works fine!

Re: Auto close after 3 mnths

Posted: Wed May 11, 2011 10:56 pm
by Lurking
Hi,
This is a fantastic idea and I will add these lines into my code.
I have a question about this subject.

- Will this apply to file attachments I have attached to tickets as well, as I do not want the attachments to be available after the ticket is closed?

UPDATE
I could not locate the line: if ($hesk_settings['custopen'] == 1) in the ticket.php file. I found this line instead: if ($hesk_settings['custopen'] != 1) in 3 other locations. The locations are: change_status.php, admin\admin_reply_ticket.php and admin\ change_status.php.

Also, I could not locate this line: ($ticket['status'] != 3 || $hesk_settings['custopen']==1) in any folder or file to block the “post reply” button?? What am I missing here? :?

Larry