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

Comments

  • 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?
Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Is something wrong with this attachment? I am able to download other attachments on the forum but this one gives me an error.
Answered 11/24/2010 by: TJSmithCIQ
Orange Belt

Please log in to comment
0
Try it now
Answered 11/25/2010 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
Works great - thanks Gerald.
Answered 12/01/2010 by: TJSmithCIQ
Orange Belt

Please log in to comment
0

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

Answered 09/27/2012 by: trugg1818
Senior Yellow Belt

Please log in to comment
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)

Answered 02/12/2014 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity