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

Download reporting #17679

Merged
merged 38 commits into from Nov 14, 2017
Merged

Download reporting #17679

merged 38 commits into from Nov 14, 2017

Conversation

mikejolley
Copy link
Member

@mikejolley mikejolley commented Nov 13, 2017

This is a continuation of #16418

TODO:

  • PHPCS

procifer and others added 30 commits July 30, 2017 19:26
…d with static UUID instead of filename based hash, to preserve download links, logs, and permissions across filename changes
…wnload count and proper escaping on report links
… log report titles in standalone function, reorganize download log data store read for code readability
…and downloads remaining in SQL to avoid race conditions with updating in PHP
… download log ids should no longer change based on file paths
…load_paths since download ids should no longer change. They are now static UUIDs.
@codecov
Copy link

codecov bot commented Nov 13, 2017

Codecov Report

Merging #17679 into master will increase coverage by <.01%.
The diff coverage is 18%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #17679      +/-   ##
============================================
+ Coverage     34.89%    34.9%   +<.01%     
- Complexity    12197    12286      +89     
============================================
  Files           332      336       +4     
  Lines         50016    50400     +384     
============================================
+ Hits          17455    17591     +136     
- Misses        32561    32809     +248
Impacted Files Coverage Δ Complexity Δ
includes/class-wc-data-store.php 75.55% <ø> (ø) 16 <0> (ø) ⬇️
...a-stores/class-wc-customer-download-data-store.php 58.45% <0%> (+11.64%) 28 <0> (ø) ⬇️
includes/class-wc-download-handler.php 0% <0%> (ø) 66 <0> (+1) ⬆️
...dmin/meta-boxes/class-wc-meta-box-product-data.php 0% <0%> (ø) 78 <0> (ø) ⬇️
includes/admin/class-wc-admin-post-types.php 0% <0%> (ø) 357 <7> (+6) ⬆️
includes/class-wc-post-data.php 59.68% <0%> (-2.63%) 78 <0> (-5)
...-wc-customer-download-log-data-store-interface.php 0% <0%> (ø) 0 <0> (?)
includes/class-woocommerce.php 7.34% <0%> (-0.05%) 74 <0> (ø)
...cludes/admin/reports/class-wc-report-downloads.php 0% <0%> (ø) 48 <48> (?)
includes/class-wc-product-download.php 47.94% <0%> (-8.4%) 31 <0> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 800877c...a50f30f. Read the comment docs.

@mikejolley mikejolley added Status: Needs Review and removed status: in progress This is being worked on. labels Nov 13, 2017
@claudiulodro
Copy link
Contributor

Deprecation notices are breaking a bunch of the tests: https://travis-ci.org/woocommerce/woocommerce/jobs/301563517

@@ -560,7 +560,7 @@ private static function get_schema() {
) $collate;
CREATE TABLE {$wpdb->prefix}woocommerce_downloadable_product_permissions (
permission_id BIGINT UNSIGNED NOT NULL auto_increment,
download_id varchar(32) NOT NULL,
download_id varchar(36) NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need an update script for this, too? Otherwise old DBs won't properly handle the new download IDs?

Copy link
Member Author

Choose a reason for hiding this comment

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

dbdelta handles it

@claudiulodro
Copy link
Contributor

Looks good and works well. Just a question and the tests need fixing.

@claudiulodro claudiulodro added needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. and removed Status: Needs Review labels Nov 13, 2017
@mikejolley mikejolley added Status: Needs Review and removed needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. labels Nov 14, 2017
@claudiulodro claudiulodro merged commit cc5c182 into master Nov 14, 2017
@claudiulodro claudiulodro deleted the update/12517-download-reporting branch November 14, 2017 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants