adding process completion logic
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-07-01 12:07:41 +02:00
parent 9bd9d9653c
commit 339091e13f
10 changed files with 353 additions and 10 deletions

View File

@ -2321,8 +2321,8 @@ function qdb_import_scoring_profiles_bundle(PDO $pdo, array $profiles, bool $rep
$now = time();
$pdo->prepare(
'INSERT INTO scoring_profile (profileID, name, description, isActive,
greenMin, greenMax, yellowMin, yellowMax, redMin, createdAt, updatedAt)
VALUES (:id, :name, :desc, :act, :gmin, :gmax, :ymin, :ymax, :rmin, :ca, :ua)'
greenMin, greenMax, yellowMin, yellowMax, redMin, processCompleteBands, createdAt, updatedAt)
VALUES (:id, :name, :desc, :act, :gmin, :gmax, :ymin, :ymax, :rmin, :pcb, :ca, :ua)'
)->execute([
':id' => $profileID,
':name' => $name,
@ -2333,6 +2333,7 @@ function qdb_import_scoring_profiles_bundle(PDO $pdo, array $profiles, bool $rep
':ymin' => (int)($profile['yellowMin'] ?? ((int)($profile['greenMax'] ?? 12) + 1)),
':ymax' => (int)($profile['yellowMax'] ?? 36),
':rmin' => (int)($profile['redMin'] ?? ((int)($profile['yellowMax'] ?? 36) + 1)),
':pcb' => qdb_encode_process_complete_bands($profile['processCompleteBands'] ?? []),
':ca' => (int)($profile['createdAt'] ?? $now),
':ua' => (int)($profile['updatedAt'] ?? $now),
]);