Please see details here. However the gist of the bug is that the ticket module passes around parameter “track_id” and uses the link file to ticket core behavior with is looking for “trackid” without the underscore. It uploads the file, but does not link it to the ticket due to the mismatched parameter name.
opened 09:25PM - 13 Sep 23 UTC
Bug
### Bug
Dolibarr version 16.0
When trying to attach a file to a Ticket it do… es not get linked to the ticket despite being uploaded successfully.
The issue is that the "Add Message" form submits the request with parameter "track_id" but the following file is looking for "trackid".
htdocs/core/actions_sendmails.inc.php
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
### Environment Version
16.0
### Environment OS
Ubunto
### Environment Web server
Apache2
### Environment PHP
PHP 7.x
### Environment Database
10.11.3-MariaDB-1 - Debian 12
### Environment URL(s)
_No response_
### Expected and actual behavior
Ticket should be linked to the uploaded file.
### Steps to reproduce the behavior
1. From Ticket card click "Add a Message" button.
2. In the add message form at the bottom of the page click the "Choose file" button.
3. Click the "ATTACH THIS FILE" button.
### Attached files
Debug test code in file [dolibarr/htdocs/core/actions_sendmails.inc.php]
<img width="709" alt="image" src="https://github.com/Dolibarr/dolibarr/assets/445543/07825235-64e6-4892-80c4-3e23cf2ab506">
Debug Log Output identifying the GETPOST parameter name mismatch.
<img width="753" alt="image" src="https://github.com/Dolibarr/dolibarr/assets/445543/71056782-d986-4e69-bb6c-49d79986d1e2">