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

Ensure number of rows and row metadata equals in processed reports #12650

Merged
merged 3 commits into from Mar 26, 2018

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Mar 26, 2018

Processed Reports currently contain an array of all rows and metadata contains an array of all row metadata. As rows without metadata didn't add an entry to the row metadata it can happen that the number of rows and row metadata doesn't match (e.g. for Others-rows). That makes it impossible to iterate over both arrays and assume the row and metadata with the same array index belongs to each other.

By always adding an empty row metadata, the number matches and #11825 should be fixed "automatically"

fixes #11825

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Mar 26, 2018
@sgiehl sgiehl added this to the 3.4.1 milestone Mar 26, 2018
@sgiehl sgiehl changed the title Ensure number of rows and row metadata equals so they can be matched Ensure number of rows and row metadata equals in processed reports Mar 26, 2018
Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgiehl
Copy link
Member Author

sgiehl commented Mar 26, 2018

@diosmosis What kind of test would you expect? The existing System tests already show that there are now empty row metadata columns

@diosmosis
Copy link
Member

@sgiehl oh I see, missed those in the PR files.

Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattab mattab merged commit d21787d into 3.x-dev Mar 26, 2018
@mattab mattab deleted the processedrowmetadata branch March 26, 2018 22:48
@mattab mattab modified the milestones: 3.4.1, 3.4.0 Mar 26, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…atomo-org#12650)

* Ensure number of rows and row metadata equals so they can be matched by ID

* reset $rowsMetadata to empty DataTable if no row had metadata

* update test files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E-Mail Report: Page URL Links shifted after "Others"
3 participants