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

specify columns in report in Report metadata and remove INDEX_... columns #6259

Closed
diosmosis opened this issue Sep 20, 2014 · 1 comment
Closed
Labels
answered For when a question was asked and we referred to forum or answered it. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@diosmosis
Copy link
Member

Instead of having hard-coded INDEX_... consts, we can specify a report's columns in Report class metadata, eg,

    $this->columns = array('nb_visits', 'nb_actions', 'nb_conversions', ...);

then in the DB, the columns will have indexes determined by the data in Report metadata, eg,

array(
    'nb_visits' => 32,
    // note: no nb_actions
    'nb_conversions' => 333
)

will be converted into

array(
    0 => 32,
    2 => 333

This will allow plugins to specify new metrics w/o having to store the full string for each column in the DB.

Will need to provide backwards compatibility, though.

@diosmosis diosmosis added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. labels Sep 21, 2014
@mattab mattab added this to the Mid term milestone Sep 21, 2014
@mattab
Copy link
Member

mattab commented May 6, 2016

This may be done / refactored as part of the Archiver refactor: #7470

@mattab mattab closed this as completed May 6, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants