Skip to content

🐛Cancel Order does not trigger recompute of event_statistics (maybe add a "refresh" button to manually trigger event_statistics recompute from dashboard? #715

@mrjbj

Description

@mrjbj

Note

Please stick to the template and provide as much detail as possible to help us diagnose and fix the issue.
Low effort bug reports will be closed.

Describe the bug
Summary
The dashboard "gross sales" comes from event_statistics.sales_total_gross (EventStatisticsResource.php:19).
The issue: When you cancel orders, the statistics are never decremented. Only completed orders trigger statistics updates, and cancellations don't reverse those updates.

Solutions:

  1. Manual fix: Directly update the event_statistics table to subtract cancelled order amounts
  2. Code fix: Modify OrderCancelService to dispatch a statistics update job that decrements the totals
  3. Recalculation: Create a command to recalculate statistics from actual order data

The discrepancy will persist until one of these approaches is implemented - there's no automatic recalculation or scheduled job that would fix it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Orders...'
  2. Click on 'cancel order'
  3. event statistis are not updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions