Active
Project:
Statistics
Version:
1.0.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2020 at 10:44 UTC
Updated:
5 Feb 2026 at 12:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedHi @ressa,
That's an interesting idea but Drush feature requests are taken on the Drush project.
-Chris
Comment #3
ressaThanks for a fast reply @cilefen, but modules are free to define their own Drush commands. See for example Search API's Drush commands.
Or do you mean that Drupal core modules specifically won't be allowed to include Drush commands?
Comment #4
ressaHere is a patch which can be used as a starting point, even if it isn't going to get implemented here, but has to be worked through as a feature requests on the Drush project.
The fields in the Statistics
node_countertable arenid,totalcount,daycountandtimestamp:Aliases
Comment #6
ressaI want at least to make it pass the test-bot :-)
Comment #7
msutharsComment #8
ressaAnother great improvement for the Drupal core Statistics counter would be adding more granular statistics, like visits per current week, month and year. That should probably be done in another issue, though.
Comment #9
ressaComment #10
cilefen commented@ressa:
Fair enough, but there are evidently none as of today:
Also, the core project doesn't depend on drush/drush.
Comment #11
ressaYes @cilefen, I noticed that there are none yet. Also, the requirement for a custom Drush command of adding a
composer.jsonin the root of a module is something to consider.Perhaps adding the reset option as a button firstly ("Reset statistics" ?) and adding a Drush command which can trigger the action which clicking that "Reset statistics" button does is a viable plan?
Comment #12
ressaHi @cilefen: I have thought more about it, and you are probably right that it is a Drush issue.
I have updated the patch for Drupal 9 in #54798: "Clear all recorded statistics" button, since the correct way would probably be to have that ready, and then hook in to it with Drush.
Comment #13
msutharsComment #14
xjmYep, Drupal core does not include Drush commands. This can be requested in the Drush queue instead. Thanks!
Comment #15
fgmThere is no such limitation now that the module is in contrib: reopening.
Comment #16
demma10 commentedAttached is a patch ported to the contrib module and upgraded for Drupal 11.
Will create an MR against the repo when I get some time.
Comment #17
fgmThe drush.services.yml is a tad optimistic, don't you think ? Otherwise LGTM. I'll verify the MR when you submit it so CI can run it.