Skip to content

Commit

Permalink
[Recreate_Conflicts] Fix Test_name change (#9460)
Browse files Browse the repository at this point in the history
Fix recreate conflicts script after #9338
  • Loading branch information
skarya22 authored Nov 11, 2024
1 parent 0b1cf9b commit ce4f220
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tools/recreate_conflicts.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
FROM flag
JOIN session s ON (s.ID=flag.SessionID)
JOIN candidate c ON (c.CandID=s.CandID)
JOIN test_names tn ON (tn.ID=flag.TestID)
WHERE Test_name=:testname AND CommentID
NOT LIKE 'DDE%' AND s.Active='Y'
AND c.Active='Y'",
Expand All @@ -78,16 +79,17 @@
foreach ($ddeInstruments as $test) {
$instruments = $db->pselect(
"SELECT CommentID, Test_name, CONCAT('DDE_',
CommentID) AS DDECommentID
FROM flag sde
JOIN session s ON (s.ID=sde.SessionID)
JOIN candidate c ON (c.CandID=s.CandID)
WHERE sde.Test_name=:testname AND sde.CommentID
NOT LIKE 'DDE%' AND sde.Data_entry='Complete'
AND s.Active='Y' AND c.Active='Y'
AND EXISTS (SELECT 'x' FROM flag dde WHERE
dde.CommentID=CONCAT('DDE_',sde.CommentID)
AND Data_entry='Complete')",
CommentID) AS DDECommentID
FROM flag sde
JOIN session s ON (s.ID=sde.SessionID)
JOIN candidate c ON (c.CandID=s.CandID)
JOIN test_names tn ON (tn.ID=sde.TestID)
WHERE Test_name=:testname AND sde.CommentID
NOT LIKE 'DDE%' AND sde.Data_entry='Complete'
AND s.Active='Y' AND c.Active='Y'
AND EXISTS (SELECT 'x' FROM flag dde WHERE
dde.CommentID=CONCAT('DDE_',sde.CommentID)
AND Data_entry='Complete')",
['testname' => $test]
);

Expand Down

0 comments on commit ce4f220

Please sign in to comment.