@tsteur opened this Pull Request on August 11th 2020 Member

fix https://github.com/matomo-org/matomo/issues/13754

implementing this already now as we'll want to patch this on the cloud

@dev-clavis commented on August 12th 2020

Could it be that the Menu test fails because the period is week and for week it shouldn't matter if the day is previous creation date because the date is within the same week?

'idSite' => 1, 'period' => 'week', -'date' => '2020-08-08', +'date' => '2020-08-07',
https://travis-ci.org/github/matomo-org/matomo/jobs/717098658#L736

// date is before site creation date but it is the current week so no need to change it $default = $this->menu->urlForDefaultUserParams($this->idSiteToday, 'week', '2020-08-06'); $this->assertEquals([ 'idSite' => $this->idSiteToday, 'period' => 'week', 'date' => '2020-08-06', ], $default);
I don't know if period range includes week
if ($defaultPeriod !== 'range' && !empty($defaultDate) && $defaultDate !== 'today') {

@tsteur commented on August 12th 2020 Member

@dev-clavis I'll have a look when I continue working on this but basically added some code so the week should work as expected which is needed when someone manually sets a very old date. I simply haven't adjusted the expected test result yet I think.

@tsteur commented on August 12th 2020 Member

Tests should pass now. There is one test failure and one UI failure in https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/41910/ but seems unrelated to this change.

This Pull Request was closed on August 24th 2020
Powered by GitHub Issue Mirror