Update version rating when updating test results
This commit is contained in:
committed by
Chris Morgan
parent
9db2c4b701
commit
e8bfc0024c
@@ -92,6 +92,9 @@ class testData{
|
||||
$this->iTestingId = query_appdb_insert_id();
|
||||
$this->testData($this->iTestingId);
|
||||
$this->SendNotificationMail();
|
||||
|
||||
if(!$this->sState == 'accepted')
|
||||
$oVersion->updateRatingInfo();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -165,24 +168,36 @@ class testData{
|
||||
"$this->sRuns.\n";
|
||||
}
|
||||
|
||||
$bUpdateRatingInfo = false;
|
||||
if($this->sTestedRating != $oOldTest->sTestedRating)
|
||||
{
|
||||
$bUpdateRatingInfo = true;
|
||||
$sWhatChanged .= "Rating was changed from $oOldTest->sTestedRating ".
|
||||
"to $this->sTestedRating.\n";
|
||||
}
|
||||
|
||||
if($this->sTestedRelease != $oOldTest->sTestedRelease)
|
||||
{
|
||||
$bUpdateRatingInfo = true;
|
||||
$sWhatChanged .= "Tested release was changed from ".
|
||||
$oOldTest->sTestedRelease." to $this->sTestedRelease.\n";
|
||||
}
|
||||
|
||||
if($bUpdateRatingInfo && $this->sState == 'accepted')
|
||||
$oVersion->updateRatingInfo();
|
||||
|
||||
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($this->sState == 'accepted')
|
||||
{
|
||||
$oOldVersion->updateRatingInfo();
|
||||
$oNewVersion->updateRatingInfo();
|
||||
}
|
||||
}
|
||||
|
||||
if(query_parameters("UPDATE testResults SET
|
||||
@@ -268,6 +283,9 @@ class testData{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->sState == 'accepted')
|
||||
$oVersion->updateRatingInfo();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -299,6 +317,8 @@ class testData{
|
||||
return false;
|
||||
}
|
||||
|
||||
$oVersion->updateRatingInfo();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user