To show the link to attachments for tasks, use the following Task / Custom Field Value script:
if (task.hasAttachments()) {
StringBuffer rez = new StringBuffer();
for (Iterator it = task.getAttachments().iterator(); it.hasNext();) {
SecuredAttachmentBean att = (SecuredAttachmentBean) it.next();
rez.append("<a target=\"blank\" href=\"");
rez.append(com.trackstudio.startup.Config.getInstance().getSiteURL());
rez.append("/DownloadAction.do?method=download&session=");
rez.append(task.getSecure().getId());
rez.append("&id=");
rez.append(att.getId());
rez.append("\">");
rez.append(att.getName());
rez.append("</a>");
rez.append("<br />");
}
return rez.toString();
} else
return "";Associated custom field properties:
|
Property |
Value |
|
Type |
String |
|
HTML View |
checked |
|
Cache Values |
unchecked |
|
Copyright (c) 2002-2006. All rights reserved.
|