@mathieucharest opened this Pull Request on June 19th 2017

This will add support for a fiscal year in the UI and the API. It will now be possible to have pre-archived fiscal year (ex : from april 2016 to march 2017). To enable the fiscal year, the user has to add the following lines in the config.ini.php file :

[General]
enabled_periods_UI = "day,week,month,year,range,fisyear"
enabled_periods_API = "day,week,month,year,range,fisyear"
fiscal_year_start_month = 4
@mathieucharest commented on June 19th 2017

I need to work and understand the error in the second tests in the DataPurgingTest.php file. As for the tests 7, 8 and 9, I don't really have a clue as to what causes the problems. Any help would be appreciated.

@mathieucharest commented on June 19th 2017

Will adjust the DataPuringTest for the fiscal year and retry.

@Findus23 commented on June 19th 2017 Member

BTW: You don't have to close this pull request and open a new one. You can just add commits to this pull request until you are finished.

@mathieucharest commented on June 19th 2017

Corrected the predictions for the DataPuringTest to take into account the new fiscal year.

@mathieucharest commented on June 20th 2017

I think I went as far as I can go with this one. I'd need some help on the remaining errors. Also, I would need to rework and put another test for the fiscal year in the Privacy settings test, but I don't understand it well enough.

Any help would be appreciated. Thanks

@mathieucharest commented on June 22nd 2017

Other then the test for the fiscal year, there is an error with the screenshots being differents. It seems every pull requests have these errors. I think it's ready for a review.

@Findus23 commented on June 22nd 2017 Member

there is an error with the screenshots being differents

You are right. The first error is because of a plugin update. You don't need to do anything.

The other one is because of the new config options. You'll need to replace tests/UI/expected-screenshots/UIIntegrationTest_admin_diagnostics_configfile.png with the correct version (e.g. from http://builds-artifacts.piwik.org). But I'd wait until everything else is finished.

@mathieucharest commented on June 28th 2017

Check failed on two screenshot files unrelated to the pull request :
ActionsDataTable_pageview_percentages.png (0.03% difference)
ActionsDataTable_unique_pageview_percentages.png (0.03% difference)

Ready for review.

@sgiehl commented on July 19th 2017 Member

Wondering if this would be do able in a new plugin after #11837 is ready

@mathieucharest commented on July 20th 2017

It might be. From what I'm reading, it would render obsolete my pull request. I needed to add support for a fiscal year fast because our organization's 100Gb per year of data is hard to read on a fiscal year basis in the actual state of Piwik. So, as long as I am able to pre-archive the data for a custom period (In my case, the fiscal year april through march), I really don't care which pull request makes it first :)

@tsteur commented on September 3rd 2020 Member

@mathieucharest sorry for getting back to you so late. As @sgiehl mentioned back then we started adding support for custom periods in https://github.com/matomo-org/matomo/pull/11837 by creating a class eg plugins/MyPlugin/PeriodFactory/FiscalYear.php and this class should extend for example the Year class in your case maybe to use it as a basis. Could you check if that works? I'd close this PR for now as we likely don't really want to have FiscalYear as a period in Matomo core but we would love to see this as a plugin if you're still interested in this feature.

This Pull Request was closed on September 3rd 2020
Powered by GitHub Issue Mirror