Development/Attachments

From Sit
Jump to: navigation, search
Broom icon32.png This article (or section) needs work.
Please help us and our readers by clicking the edit link above and expanding/improving this text.

<= 3.33 system)

When you attach to an incident update it puts the file in attachments/incident/12345/100000000 where 12345 is the incident number and 10000000 is the unix timestamp in addition when you attach via the files tab it simply puts the file in attachments/incidents/12345 we found that using the timestamp, although seemingly a good idea for normal updates, is a bad idea for emails, because you have two dates, the date the email arrives, and the date the update went into the log so we worked around that by having an attachments/updates directory which would have a symlink with the ID of the update linked back to the attachments/12345/1000000 timestamp dir trouble is, symlinks aren't platform independent incoming email puts the file in attachments/incidents/12345/120000000 where 120000000 is the timestamp of the email arrival time, then creates a symlink in attachment/updates using the updateid, at least it does with the salford incoming email plugin, the inboundemail.php may do something random, simply coz it wasn't finished

Proposed (> 3.35)

- Attachments to updates to be stored in attachments/incident/12345/u5678 where 5678 is the update ID and 12345 is the incidentid ++ - Attachments to incidents unrelated to updates to be stored in attachments/incident/12345 as before where 12345 is the incidentid++ - Attachments to incoming emails with no incident number to be stored in attachments/updates/5678 where 5678 is the update ID - When incoming emails are used to create an incident, the attachments should be moved to attachments/incident/12345/u5678 - All files should be given an entry in the files table - Listing/viewing files will use the existing mechanism so that existing files will still show up, except that an additional step of looking up the file in the files table to get extra info such as timestamp, and distribution (pub/private)

Personal tools
project