From 0a9665b24f1a650edd36eadb3bc765d60ea65d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 16 Dec 2007 15:28:37 +0100 Subject: [PATCH] Fix moving of testResults from qeueud to accepted versions --- include/testData.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/testData.php b/include/testData.php index a49e373..3fcb9ba 100644 --- a/include/testData.php +++ b/include/testData.php @@ -177,6 +177,14 @@ class testData{ $oOldTest->sTestedRelease." to $this->sTestedRelease.\n"; } + if($this->iVersionId != $oOldTest->iVersionId) + { + $sWhatChanged .= 'Moved from '.version::fullName($oOldTest->iVersionId).' to '.version::fullName($this->iVersionId)."\n"; + $oNewVersion = new version($this->iVersionId); + if($oNewVersion->objectGetState() == 'accepted' && $this->sState == 'pending') + $this->sState = 'queued'; + } + if(query_parameters("UPDATE testResults SET versionId = '?', whatWorks = '?', @@ -188,7 +196,8 @@ class testData{ installs = '?', runs = '?', testedRating = '?', - comments = '?' + comments = '?', + state = '?' WHERE testingId = '?'", $this->iVersionId, $this->shWhatWorks, @@ -201,6 +210,7 @@ class testData{ $this->sRuns, $this->sTestedRating, $this->sComments, + $this->sState, $this->iTestingId)) { if(!$bSilent)