Closed MPZinke closed 3 years ago
Priority assignment is deferred to Eric.
Tentative fix is added to branch Bugfix-#65
. It involve the above Proposal. Because this involves printing on the thermal printer, testing will occur on the Dev server.
Additionally, Wait_queue::insertQaitQueue()
function did not properly handle $mysqli->insert_id
. This caused the value to NULLify before use. This never showed up before, because the NULL zero was checked as being numeric, and was never used afterwards when returned. Issue fixed with d934001
@MPZinke made updates on Saturday that resolve the issue, ready to merge into Dev.
Fix has been rolled out to production. Closing issue.
The Wait_queue::printTicket method's parameters can lead to ambiguous ticket selection, causing the first active ticket for a user to be selected. This causes issues when a user has multiple wait queue tickets, because the query does not select the correct one.
Proposal: Change
public static function printTicket($operator, $dg_id)
topublic static function printTicket($Q_id)
so that the passed ID references a primary key. Subsequent changes affect:Wait_queue::printTicket():
SELECT \
wait_queue`.`estTime`, `wait_queue`.`Q_id`, `devices`.`device_desc` FROM `wait_queue` LEFT JOIN `devices` ON `wait_queue`.`Dev_id` = `devices`.`d_id` WHERE `wait_queue`.`Operator` = $operator AND `wait_queue`.`Devgr_id` = $dg_id AND `wait_queue`.`valid` = 'Y';`Wait_queue::insertWaitQueue():
Wait_queue::printTicket($operator, $dg_id);
(both)