Hi, my reports aren't auto updating.
Is it the normal behaviour? How can I force it?
Should I setup a cron action or something similar?
Thank's for all!

Comments

mglaman’s picture

Status: Active » Postponed (maintainer needs more info)

There's no caching enabled, so all reports are generated when viewed.

Can you provide more specifics?

polmaresma’s picture

I see the problem now.
I use https://www.drupal.org/project/commerce_billy wich adds an extra order state and the views does not include it on the filters.
If I add this on the views filter (all the views) chould it work?
Thank's for all.

mglaman’s picture

Title: How to update reports? » Support Commerce Billy order states
Category: Bug report » Feature request
Status: Postponed (maintainer needs more info) » Active

Correct! That would fix the whole issue. I'm going to put this to active and change it as a feature request to conditionally support Commerce Billy order states.

parasolx’s picture

Version: 7.x-4.0-beta1 » 7.x-4.x-dev
Status: Active » Needs review
StatusFileSize
new15.07 KB

I'm creating this patch and tested on live site. It's work right now. For replacing, kindly to clear your cache after updating. This report support site using Commerce Billy with invoice state.

parasolx’s picture

StatusFileSize
new34.54 KB

Fixed error of invalid selection for those didn't enable or installed commerce billy.

jawi’s picture

Test latest patch commerce_reports-2345319-5.patch on commerce kickstart project. No issues found, does what it should do!

mglaman’s picture

Marking this under the beta2 release plan #2425267: [META] 4.0 Beta2 Release Plan

Time to get this reviewed and in.

mglaman’s picture

Status: Needs review » Postponed

I'm actually going to postpone this until #2404799: Using order status where order state should be used is in. This makes complete switch over to order state in the report Views.

Also, we have some conflicts with recent update to Tax submodule

+++ commerce_reports/modules/tax/commerce_reports_tax.module	2015-01-12 20:36:18.000000000 +0800
@@ -197,7 +207,12 @@ function commerce_reports_tax_entity_del
 function commerce_reports_tax_order_statuses() {
-  return array('pending', 'completed');
+  if (module_exists('commerce_billy')) {
+    return array('pending', 'completed', 'invoiced');
+  }
+  else {
+    return array('pending', 'completed');
+  }

See update - statuses for tax are configurable

It also needs some work.

+++ commerce_reports/includes/views/commerce_reports.views_default.customers.inc	2015-01-12 20:21:40.000000000 +0800
@@ -6,6 +6,21 @@
+  /* Set status array for independent Commerce Billy module */
+  if(module_exists('commerce_billy')) {
+    $status = array(
+      'pending' => 'pending',
+      'completed' => 'completed',
+      'invoiced' => 'invoiced'
+    );
+  }
+  else {
+    $status = array(
+      'pending' => 'pending',
+      'completed' => 'completed'
+    );
+  }
+

Instead of writing this 5+ or so times, why not a function that retrieves default order statuses?

Or, better yet, use that function to introduce an alter hook so people can easily add statuses.

mglaman’s picture

mglaman’s picture

Status: Postponed » Needs work

This is no longer postponed. However I wouldn't commit this patch. Needs to be rerolled as a single function returning the order states and invoking a hook to allow other modules to add/remove (via drupal_alter) those states.

The last submitted patch, 4: commerce_reports-2345319.patch, failed testing.

The last submitted patch, 5: commerce_reports-2345319-5.patch, failed testing.

mglaman’s picture

parasolx’s picture

nice one mglaman. it should be incorporate into hook_form_alter.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new21.97 KB

Here is a patch which adds a new helper function to get order states, which invokes an alter. This way a user can add the states, or even a patch written for Commerce Billy to add this.

Status: Needs review » Needs work

The last submitted patch, 15: support_commerce_billy-2345319-15.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new21.97 KB

Not sure how git diff made a bad patch.. but it was done in PhpStorm terminal. Here's one from not, for kicks.

Status: Needs review » Needs work

The last submitted patch, 17: support_commerce_billy-2345319-17.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new22.64 KB

Sorry for spam all - trying again.

Status: Needs review » Needs work

The last submitted patch, 19: support_commerce_billy-2345319-19.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new21.98 KB

Should be fixed.

  • mglaman committed 88f7543 on 7.x-4.x
    Issue #2345319 by mglaman, parasolx: Support Commerce Billy order states
    
mglaman’s picture

Status: Needs review » Fixed

Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.