/build/static/layout/Breadcrumb_cap_w.png

How to turns attachments in tickets into URLs

Here's a rule that we use in our helpdesk to convert attachment file names to URLs. The benefit is that when this gets emailed to the user they have a link to use for the attachment. The filename on it's own is not extremely useful to us, but this makes it very useful

You will have to import this as a resource into your 5.1 kbox . See the admin guide for details, but it's under settings->resources of the ORG that you want to use.

Attachment

 

Updated for 5.5+

here is the rule...

frequency = on ticket save

order = run before any rules that send emails

select query: 

select distinct C.ID from HD_TICKET join HD_TICKET_CHANGE C on C.HD_TICKET_ID = HD_TICKET.ID
join HD_ATTACHMENT A on A.HD_TICKET_CHANGE_ID = C.ID
where 
C.ID = <CHANGE_ID>
 
update query: 
 update HD_TICKET T join HD_TICKET_CHANGE C on C.HD_TICKET_ID = T.ID
join HD_ATTACHMENT A on A.HD_TICKET_CHANGE_ID = C.ID
set 
C.DESCRIPTION = IF(LOCATE('Added Attachment "http://',C.DESCRIPTION)>0, C.DESCRIPTION, 
REPLACE(C.DESCRIPTION,'Added attachment "',
CONCAT('Added attachment "http://yourkboxhostname/packages/hd_attachments/',FILE_NAME,'.',A.CHECKSUM,'"'))),
C.LOCALIZED_DESCRIPTION= IF(LOCATE('"http://',C.LOCALIZED_DESCRIPTION)>0, C.LOCALIZED_DESCRIPTION, 
REPLACE(C.LOCALIZED_DESCRIPTION,FILE_NAME,CONCAT('http://yourkboxhostname/packages/hd_attachments/'
,FILE_NAME,'.',A.CHECKSUM))) 
WHERE 
C.ID = <TICKET_ID>

1 Comment   [ + ] Show comment
  • Hi GillySpy, I realize that this is a old post, but it would greatly benefit our organization if we could have links for the attachments in our custom ticket rules. Will this work for 5.5? - Kevino2010 10 years ago

Answers (5)

Posted by: GillySpy 10 years ago
7th Degree Black Belt
1

This is an appdeploy article that didn't migrate very well. To do this today I would contact support and download a kbin that will turn on the new attachment handling that is in the 5.5 and 6.0 product.   After that is on then you can use this rule (i'll repost)

Posted by: TJSmithCIQ 14 years ago
Orange Belt
0
Is something wrong with this attachment? I am able to download other attachments on the forum but this one gives me an error.
Posted by: GillySpy 14 years ago
7th Degree Black Belt
0
Try it now
Posted by: TJSmithCIQ 13 years ago
Orange Belt
0
Works great - thanks Gerald.
Posted by: trugg1818 12 years ago
Senior Yellow Belt
0

I apologize if I'm just missing it, but where can I find the link to the rule?  Thanks.

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ