Skip to content

Commit

Permalink
[Recreate_Conflicts] Fix Test_name change
Browse files Browse the repository at this point in the history
  • Loading branch information
skarya22 committed Nov 8, 2024
1 parent 0b1cf9b commit e75d6fd
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 e75d6fd

Please sign in to comment.