New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for a fiscal year #11805
Conversation
- FiscalYearComparedToPreviousYear - PeriodFiscalYear - PeriodFiscalYears
…config.ini file to be enabled : [General] enabled_periods_UI = "day,week,month,year,range,fisyear" enabled_periods_API = "day,week,month,year,range,fisyear" fiscal_year_start_month = 5 [Deletereports] delete_reports_keep_fisyear_reports = 1
…n to prevent errors from the UI where it was not possible to check if fisyear was enabled. Corrected a bug where it was not possible to correctly save delete_reports_keep_fisyear_reports to the database.
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. |
Will adjust the DataPuringTest for the fiscal year and retry. |
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. |
Corrected the predictions for the DataPuringTest to take into account the new fiscal year. |
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 |
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. |
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 |
Check failed on two screenshot files unrelated to the pull request : Ready for review. |
Wondering if this would be do able in a new plugin after #11837 is ready |
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 :) |
@mathieucharest sorry for getting back to you so late. As @sgiehl mentioned back then we started adding support for custom periods in #11837 by creating a class eg |
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 :