Skip to content
Extraits de code Groupes Projets
Valider b82aca52 rédigé par mattab's avatar mattab
Parcourir les fichiers

refs #5933 we must specifically invalidate day reports so that monthly reports...

refs #5933 we must specifically invalidate day reports so that monthly reports have a chance to be re-processed. added note in the API comment.
parent 2133945f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -57,7 +57,9 @@ class API extends \Piwik\Plugin\API
*
* @param string $idSites Comma separated list of idSite that have had data imported for the specified dates
* @param string $dates Comma separated list of dates to invalidate for all these websites
* @param string $period If specified (one of day, week, month, year, range) it will only delete archives for this period
* @param string $period If specified (one of day, week, month, year, range) it will only delete archives for this period.
* Note: because week, month, year, range reports aggregate day reports then you need to specifically invalidate day reports to see
* other periods reports processed..
* @throws Exception
* @return array
*/
......
......@@ -129,7 +129,9 @@ class ArchiveInvalidationTest extends IntegrationTestCase
$r = new Request("module=API&method=CoreAdminHome.invalidateArchivedReports&idSites=" . self::$fixture->idSite1 . "&dates=" . $dateToInvalidate1->format('Y-m-d'));
$this->assertApiResponseHasNoError($r->process());
// Month reports only are invalidated and we test our weekly report will still show old data.
// Days & Months reports only are invalidated and we test our weekly report will still show old data.
$r = new Request("module=API&method=CoreAdminHome.invalidateArchivedReports&period=day&idSites=" . self::$fixture->idSite2 . "&dates=" . $dateToInvalidate2->format('Y-m-d'));
$this->assertApiResponseHasNoError($r->process());
$r = new Request("module=API&method=CoreAdminHome.invalidateArchivedReports&period=month&idSites=" . self::$fixture->idSite2 . "&dates=" . $dateToInvalidate2->format('Y-m-d'));
$this->assertApiResponseHasNoError($r->process());
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter