Issue Summary
In osTicket v1.18 (official release, clean install), attachments are sometimes not associated with ticket threads despite successful message submission. The file is present in ost_file, but no record is created in ost_attachment, causing the attachment to be invisible in the UI.
Symptoms
File appears in ost_file (e.g., IDs 85, 86, 87)
All fields in the join query (object_id, thread_id, entry_type, ticket_id) are NULL
The ticket reply or message itself is saved correctly
No PHP or application errors logged
Problem is intermittent — occurs sporadically under normal usage
Environment
osTicket version: v1.18 (schema_signature = 180)
Deployment: Single server, no load balancer, no multi-node setup
Upload endpoint used: /ajax.php/form/upload/.../attach (both client and staff paths observed)
Response from upload: {"id": <numeric>} — not a token like att_xxx
Expected Behavior
Every successfully uploaded attachment should be reliably linked to its corresponding thread entry via ost_attachment.
Current Impact
Users (both agents and clients) report that “attachments vanish” after submitting a ticket or reply, even though the system shows a success message. This erodes trust and causes operational delays.
Request
Please investigate whether the temporary attachment tracking mechanism (whether session-based or draft-based) has a race condition or silent failure path in v1.18 that can cause association to be skipped without error.