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.
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)
Please log in to answer
Posted by:
GillySpy
10 years ago
Posted by:
TJSmithCIQ
14 years ago
Posted by:
trugg1818
12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.