Issue Attachments
ISSUEATTACHMENTS | |||||||
---|---|---|---|---|---|---|---|
Column | ID | ISSUEID | AUTHOR | CREATED | FILENAME | FILESIZE | MIMETYPE |
Type | BIGINT | BIGINT | VARCHAR | TIMESTAMP | VARCHAR | BIGINT | VARCHAR |
Indexed | x | x |
Example:
Attached documents (DOC, DOCX and PDF) larger than 1 Mb in the last week:
Example 1
SELECT LINK(JQL.ISSUE, '_blank') AS "Issue", IA.AUTHOR AS "Author", FORMATDURATIONNATURAL(DATEDIFF('MILLISECOND', IA.CREATED, CURRENT_TIMESTAMP())) AS "Uploaded", IA.FILENAME as "Document", (IA.FILESIZE / (1024* 1024)) AS "Size (Mb)" FROM JQL JOIN ISSUEATTACHMENTS IA ON IA.ISSUEID = JQL.ISSUEID WHERE JQL.QUERY = ' reporter = currentUser() ' AND CREATED > CURRENT_TIMESTAMP() - 7 AND REGEXP_LIKE(IA.FILENAME, '([a-zA-Z0-9\s_\\.\-\(\):])+(.doc|.docx|.pdf)$', 'i')
Result:
DEMO-1 | admin | 3d 15h 27m | SQL+JQL briefing.pdf | 1.2 |