Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
In the ticket/card.php file there is a condition that is evaluated incorrectly because the "private_message" parameter is compared to an unexpected value.
Bug
In the ticket/card.php file there is a condition that is evaluated incorrectly because the "private_message" parameter is compared to an unexpected value.
if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $permissiontoread) {
$ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0), 0);
GETPOST('private_message', 'alpha') is always "1" or "0", never is "on"
This violates the scenario that if a comment is marked private, the status should not change.
Dolibarr Version
20.0.2
Environment PHP
8.0
Environment Database
MySQL
Steps to reproduce the behavior and expected behavior
Behavior Add a new message in ticket card and mark it as private. The status changes to "IN PROGRESS"
Expected
The status does not change. The same state is maintained.
Attached files
No response