testData: add 'pending' queue state
This commit is contained in:
committed by
Chris Morgan
parent
489698c29f
commit
da471d1ad8
@@ -63,6 +63,12 @@ class testData{
|
||||
// Creates a new Test Results.
|
||||
function create()
|
||||
{
|
||||
$oVersion = new version($this->iVersionId);
|
||||
if($oVersion->sQueued != "false")
|
||||
$this->sQueued = "pending";
|
||||
else
|
||||
$this->sQueued = $this->mustBeQueued() ? "true" : "false";
|
||||
|
||||
$hResult = query_parameters("INSERT INTO testResults (versionId, whatWorks, whatDoesnt,".
|
||||
"whatNotTested, testedDate, distributionId, testedRelease,".
|
||||
"installs, runs, testedRating, comments,".
|
||||
@@ -79,7 +85,7 @@ class testData{
|
||||
$this->sTestedRating, $this->sComments,
|
||||
"NOW()",
|
||||
$_SESSION['current']->iUserId,
|
||||
$this->mustBeQueued() ? "true" : "false");
|
||||
$this->sQueued);
|
||||
|
||||
if($hResult)
|
||||
{
|
||||
@@ -246,7 +252,7 @@ class testData{
|
||||
}
|
||||
|
||||
// If we are not in the queue, we can't move the test data out of the queue.
|
||||
if(!$this->sQueued == 'true')
|
||||
if($this->sQueued == 'false')
|
||||
return false;
|
||||
|
||||
if(query_parameters("UPDATE testResults SET queued = '?' WHERE testingId = '?'",
|
||||
|
||||
@@ -17,8 +17,7 @@ class version_queue
|
||||
|
||||
if($iVersionId)
|
||||
{
|
||||
$iTestingId = testData::getNewestTestIdFromVersionId($iVersionId,
|
||||
$this->oVersion->sQueued);
|
||||
$iTestingId = testData::getNewestTestIdFromVersionId($iVersionId, "pending");
|
||||
/* This illustrates the importance of converting downloadurl completely
|
||||
to the objectManager model. If we don't get a match searching for
|
||||
a queued entry, try finding a rejected one. */
|
||||
@@ -54,7 +53,6 @@ class version_queue
|
||||
function reQueue()
|
||||
{
|
||||
$this->oVersion->reQueue();
|
||||
$this->oTestDataQueue->reQueue();
|
||||
$this->oDownloadUrl->reQueue();
|
||||
}
|
||||
|
||||
@@ -64,8 +62,6 @@ class version_queue
|
||||
|
||||
if($this->oDownloadUrl->iId)
|
||||
$this->oDownloadUrl->reject();
|
||||
|
||||
$this->oTestDataQueue->reject();
|
||||
}
|
||||
|
||||
function update()
|
||||
|
||||
@@ -20,6 +20,6 @@ create table testResults (
|
||||
comments text,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
queued enum('true','false','rejected','pending') NOT NULL default 'false',
|
||||
key(testingId)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user