Skip to content
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

Delete data with specific hours #10008

Open
Velborg opened this issue Apr 5, 2016 · 6 comments
Open

Delete data with specific hours #10008

Velborg opened this issue Apr 5, 2016 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@Velborg
Copy link

Velborg commented Apr 5, 2016

I delete data with the ./console core:delete-logs-data like this :
./console core:delete-logs-data --dates=2016-03-23,2016-03-24 --idsite=1
By default the hours are 00:00:00 and i can't change them.

Is it possible to implement something to delete data but with specific hours ?
ex :
./console core:delete-logs-data --dates=2016-03-23,2016-03-24 --hours:23:50:00,23:55:00 --idsite=1 (meaning i want to delete data between 2016-03-23 23:50:00 and 2016-03-24 23:55:00)

Regards,

@tsteur tsteur added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Apr 5, 2016
@tsteur
Copy link
Member

tsteur commented Apr 5, 2016

I reckon that should be possible to implement. I have not tried it but looking at the code there might be a chance it already works by specifying --dates in format YYYY-MM-DD HH:MM:SS, YYYY-MM-DD HH:MM:SS.

@mattab would it make sense to have a new label like "administration/maintenance" or so? Meaning it is an enhancement for administration or so. Or maybe it would make sense at some point to define instead labels for different "users/roles" like "SuperUser, DevOp (administration/maintenance), Marketing, Developer (platform), Web analyst (end user analyzing reports etc), ..."

@Velborg
Copy link
Author

Velborg commented Apr 6, 2016

i tested but it didn't work :(
./console core:delete-logs-data --idsite=31 --dates=2016-04-04 06:25:00,2016-04-05 06:25:00

[RuntimeException]
Too many arguments.

@RMastop
Copy link
Contributor

RMastop commented Apr 6, 2016

Hi @Velborg,

Please use it by providing the command in quotes, like the following:
./console core:delete-logs-data --idsite=31 --dates="2016-04-04 06:25:00,2016-04-05 06:25:00"

You basically need to concatenate the date-time string. If the command notices a space, the following part is interpreted as a new argument.

Cheers,
Richard

@Velborg
Copy link
Author

Velborg commented Apr 6, 2016

Hello @RMastop,

Thx it's working !! :)

Maybe the delete help can notice it ?
./console core:delete-logs-data -h
--dates Delete log data with a date within this date range. Eg, 2012-01-01,2013-01-01

@tsteur
Copy link
Member

tsteur commented Apr 6, 2016

To finish this issue we should update the docs and explain possibility to specify hours, and ideally also write a test for it to make sure we don't break this feature.

@tsteur tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Apr 6, 2016
@mattab mattab added this to the 2.16.x (LTS) milestone Jul 14, 2016
@hpvd
Copy link

hpvd commented Jul 15, 2016

good to see :-)
Please ad a link to docu if updated within this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

5 participants