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.
|
// Creates a new Test Results.
|
||||||
function create()
|
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,".
|
$hResult = query_parameters("INSERT INTO testResults (versionId, whatWorks, whatDoesnt,".
|
||||||
"whatNotTested, testedDate, distributionId, testedRelease,".
|
"whatNotTested, testedDate, distributionId, testedRelease,".
|
||||||
"installs, runs, testedRating, comments,".
|
"installs, runs, testedRating, comments,".
|
||||||
@@ -79,7 +85,7 @@ class testData{
|
|||||||
$this->sTestedRating, $this->sComments,
|
$this->sTestedRating, $this->sComments,
|
||||||
"NOW()",
|
"NOW()",
|
||||||
$_SESSION['current']->iUserId,
|
$_SESSION['current']->iUserId,
|
||||||
$this->mustBeQueued() ? "true" : "false");
|
$this->sQueued);
|
||||||
|
|
||||||
if($hResult)
|
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 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;
|
return false;
|
||||||
|
|
||||||
if(query_parameters("UPDATE testResults SET queued = '?' WHERE testingId = '?'",
|
if(query_parameters("UPDATE testResults SET queued = '?' WHERE testingId = '?'",
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ class version_queue
|
|||||||
|
|
||||||
if($iVersionId)
|
if($iVersionId)
|
||||||
{
|
{
|
||||||
$iTestingId = testData::getNewestTestIdFromVersionId($iVersionId,
|
$iTestingId = testData::getNewestTestIdFromVersionId($iVersionId, "pending");
|
||||||
$this->oVersion->sQueued);
|
|
||||||
/* This illustrates the importance of converting downloadurl completely
|
/* This illustrates the importance of converting downloadurl completely
|
||||||
to the objectManager model. If we don't get a match searching for
|
to the objectManager model. If we don't get a match searching for
|
||||||
a queued entry, try finding a rejected one. */
|
a queued entry, try finding a rejected one. */
|
||||||
@@ -54,7 +53,6 @@ class version_queue
|
|||||||
function reQueue()
|
function reQueue()
|
||||||
{
|
{
|
||||||
$this->oVersion->reQueue();
|
$this->oVersion->reQueue();
|
||||||
$this->oTestDataQueue->reQueue();
|
|
||||||
$this->oDownloadUrl->reQueue();
|
$this->oDownloadUrl->reQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +62,6 @@ class version_queue
|
|||||||
|
|
||||||
if($this->oDownloadUrl->iId)
|
if($this->oDownloadUrl->iId)
|
||||||
$this->oDownloadUrl->reject();
|
$this->oDownloadUrl->reject();
|
||||||
|
|
||||||
$this->oTestDataQueue->reject();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update()
|
function update()
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ create table testResults (
|
|||||||
comments text,
|
comments text,
|
||||||
submitTime datetime NOT NULL,
|
submitTime datetime NOT NULL,
|
||||||
submitterId int(11) NOT NULL default '0',
|
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)
|
key(testingId)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user