Deleted orders are not cleared from reports

Created on 7 August 2019, over 5 years ago
Updated 13 October 2023, over 1 year ago

The refresh (regenerate) function deletes and regenerates report records for existing orders but does not delete report records for orders that no longer exist - so these confuse the report View.

public function refreshReports(array $order_ids, $plugin_id = NULL) {
    // Delete any existing reports. 

could just delete everything - or an event listener is needed to catch order deletions

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom Jons

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024