how to disable attachments in resolved/closed tickets

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Lurking
Posts: 32
Joined: Sun Nov 28, 2010 4:57 am

how to disable attachments in resolved/closed tickets

Post by Lurking »

Script URL:
Version of script: 2.4.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:
Hi,
Is it possible to disable clickable attachments within messages on tickets that have been closed/resolved without actually deleting the entire message itself? I do not want to make attachments available after a ticket is closed by the customer or after the scheduled "autoclose" period has taken effect. Thanks, Larry
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: how to disable attachments in resolved/closed tickets

Post by Klemen »

The easiest thing to do would be to:

1. open ticket.php in an editor
2. find line

Code: Select all

hesk_cleanBfAttempts();
3. below this line add

Code: Select all

if ($ticket['status'] == 3)
{
	$hesk_settings['attachments']['use'] = 0;
}
4. save, upload and test

This should hide attachments from closed tickets. If you prefer to just disable links but still list them, this would require more work.
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
Lurking
Posts: 32
Joined: Sun Nov 28, 2010 4:57 am

Re: how to disable attachments in resolved/closed tickets

Post by Lurking »

Hi Klemen,
Thanks again for your help! :D
Lurking
Posts: 32
Joined: Sun Nov 28, 2010 4:57 am

Re: how to disable attachments in resolved/closed tickets

Post by Lurking »

Klemen,
Just wanted to let you know this feature works with SOME files, but the attachment link still shows and is still "clickable".

Example:
Someone clicks on a .PDF file in a "closed" ticket, the link will start to open, but then a message appears after a moment saying the file is either "not supported" or is "corrupt" (same with a .wav file).
If a .JPG image is selected, an error popes up saying the file is "empty". VERY COOL, this works for me!
BUT, you can still open/download .RTF and .ZIP files??? I want to prevent this in closed tickets.

Why would this only work for SOME files and not others?

Why do the the links/files still show after your MOD? The reason did not bring this up before was because I did not test the .ZIP or .PDF attachments. These are the attachments I really need blocked. The .JPG's are not as important to me. Thanks, Larry
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: how to disable attachments in resolved/closed tickets

Post by Klemen »

This should *hide* all links on the *customer* side, links will still show from the staff panel.

The errors you get are not related to this modification, but rather to server not processing file downloads properly. HESK downloaded files should be forced as a download and not opened directly in browser - if this happens you have an error somewhere breaking HTTP headers.

Try uploading original HESK files to the server:
- /language/ folder
- download_attachment.php
- inc/common.inc.php
- inc/database.inc.php
- inc/admin_functions.inc.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
Lurking
Posts: 32
Joined: Sun Nov 28, 2010 4:57 am

Re: how to disable attachments in resolved/closed tickets

Post by Lurking »

Thanks, I was testing on my end. The links do not show as advertised. Sorry about that.
laycomp
Posts: 3
Joined: Tue May 14, 2013 5:17 am

Re: how to disable attachments in resolved/closed tickets

Post by laycomp »

Works in Hesk Desk 2.4.2

Thanks, great solution!
Post Reply