Previously, there was an issue with this module where the CSV exports would not actually pay any mind to the filters. The Sales Report seemed to be fixed by the latest updates, but the Product Report at admin/commerce/reports/products still does not seem to take the date range filters into play when clicking on the CSV button. Can that be fixed yet?
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | product_report_filters-2505295-19.patch | 2.21 KB | mglaman |
| #15 | product_report_filters-2505295-15.patch | 10.2 KB | mglaman |
| #9 | product_report_filters-2505295-9.patch | 10.5 KB | mglaman |
Comments
Comment #1
mglamanMarking for the beta3 sprint
Comment #2
strings6 commentedHi Matt,
When is the beta3 sprint expected to happen? Knowing will help me get some idea of when the issue might be resolved.
Thanks
Comment #3
mglamanstrings6, I'm running Commerce Reports in a 2 month release cycle. Each cycle being a sprint. So far no one has contributed and I haven't had spare time, which means beta3 will miss the July 1st window and be pushed until September.
Comment #4
strings6 commentedHi Matt,
If you can offer any input on how you'd fix this (based on the filters you did fix), or where to look, I could try.
I have a client that is really needing date filters to work. July 1 would have been perfect (shoot!).
Thanks.
Comment #5
strings6 commentedHello,
I was wondering if the 2015-Aug-04 7.x-4.x-dev version addressed this issue.
Thanks
Comment #6
mglamanTested locally and cannot reproduce. When exporting a product report filtered by SKU or date the CSV matched each time. Leaving open because we have no test coverage for CSV exports.
Comment #7
strings6 commentedThe Date filters work for us on the screen, but they don't work on the export.
At first, I thought it was working for us too, but then I remembered it's the export part that isn't holding on to the filters.
Comment #8
mglamanstrings6 thanks for re-confirming. I'm going to write some tests to automate this so it can be nipped once and for all!
Comment #9
mglamanHere's a patch to get started on bringing in test coverage. This patch doesn't include filtering results, but we had nothing so it's a good start.
Comment #10
mglamanMade a new component just for the exports.
Comment #12
mglamanTest dependency added, but need to bump this to #2561031: [META] 4.0 Beta4 Release Plan
Comment #15
mglamanReroll
Comment #17
strings6 commentedHello,
OK, so you want me to switch to 7.x-4.x-dev, and apply the patch, and see if the filters for Date stick during the CSV import, or where exactly are we at with this patch?
OR, did you already apply the patch to 7.x-4.x-dev today, so I should just switch to that version and it already includes the change?
Let me know, and I'll try it.
Comment #18
mglamanstrings6, there isn't a patch yet. #15 and #16 are just commits to get automated test coverage of the exports going. If we want to fix this, the right way will be to get the tests to catch the error and then fix it. That way we know it won't break again :)
Comment #19
mglamanHere is patch testing filters on CSV. However I think we need to test how it reads the page it's attached to.
Comment #22
mglamanstring6, here's how we can test, The CSV attachment link should mirror the query parameters on your filtered view. If those don't match, then there's an issue. However, if you customized the main view you may need to update the export dispkay, too.
Comment #23
strings6 commentedThe link does mirror the query parameters on the filtered view, for example:
admin/commerce/reports/products/csv?sku=&date_filter[min][date]=08-01-2015&date_filter[max][date]=08-31-2015
However, the result does not yield a csv file with only the data I'd expect.
My filtered view only has 143 results, but the csv file I get has 569.
When I looked closer, I found that my CSV tab in the view doesn't have the date filter. Argh!
I'm not sure if the product report view is supposed to have a data filter for the view and the csv export out of the box, or did I add it to the report at some point?
I'm wondering if I should revert the view, or if I need to add the date filter to the csv to get it.
Comment #24
strings6 commentedAn update:
I am still not sure if I could have just reverted the product report view (does the CSV export view come with a date filter out of the box?), but I just manually added the exposed date filter to the CSV export tab of the view (I matched the default page date filter settings). Now the export filters by the date correctly!
So I'm all set.