Details
-
Suggestion
-
Resolution: Won't Fix
-
None
-
None
-
1
-
Description
We are developers of the Attachment Checker for JIRA app.
Our app is checking whether there is any duplicate attachments with the same name or the file limit count is exceeded.
We have discovered when a attachment is uploaded in a Create issue or JSD comment form, a record is inserted for the new temporary attachment.
However, when the form is cancelled, the records in the database are not cleared.
Over time, the database will contain a lot of records of the attachments which have not been uploaded.
Example
select * from tempattachmentsmonitor limit 1; | TEMPORARY_ATTACHMENT_ID | FORM_TOKEN | FILE_NAME | CONTENT_TYPE | FILE_SIZE | CREATED_TIME | +-------------------------+------------+--------------+--------------+-----------+---------------+ | temp1386875119513987260 | undefined | download.jpg | image/jpeg | 6772 | 1504691840543 | +-------------------------+------------+--------------+--------------+-----------+---------------+
We will like to suggest to add 2 more fields into the table so that we can identify the attachments attached to the current issue form more accurately.
- creator
- issueid
It will be good to add a scheduled job to housekeep those records which have been created more than 1 day.