Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-b1
-
Component/s: None
-
Labels:None
Description
The issue is clearly seen in the code. We fetch services based on renewal date (see plugins/domains/domains_plugin.php around line 1258).
Potential solution: Update plugins/domains/domains_plugin.php around line 1258 from
$services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'date_renews', 'operator' => '>=', 'value' => $start_date], ['column' => 'date_renews', 'operator' => '<=', 'value' => $end_date] ] ] );
To
$domains = $this->Record->select()-> from('domains_domains')-> where('expiration_date', '>=', $start_date)-> where('expiration_date', '<=', $end_date)-> fetchAll(); $service_ids = array_values($this->Form->collapseObjectArray($domains, 'service_id', 'service_id')); // Fetch all qualifying services $services = []; if (!empty($service_ids)) { $services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'id', 'operator' => 'in', 'value' => $service_ids] ] ] ); }
Activity
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Sprint | 5.6.0-b1 Sprint x [ 170 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Description |
The issue is clearly seen in the code. We fetch services based on renewal date (see plugins/domains/domains_plugin.php around line 1294).
Potential solution: Update plugins/domains/domains_plugin.php around line 1258 from {code:java} $services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'date_renews', 'operator' => '>=', 'value' => $start_date], ['column' => 'date_renews', 'operator' => '<=', 'value' => $end_date] ] ] ); {code} To {code:java} $domains = $this->Record->select()-> from('domains_domains')-> where('expiration_date', '>=', $start_date)-> where('expiration_date', '<=', $end_date)-> fetchAll(); $service_ids = array_values($this->Form->collapseObjectArray($domains, 'service_id', 'service_id')); // Fetch all qualifying services $services = []; if (!empty($service_ids)) { $services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'id', 'operator' => 'in', 'value' => $service_ids] ] ] ); } {code} |
The issue is clearly seen in the code. We fetch services based on renewal date (see plugins/domains/domains_plugin.php around line 1258). Potential solution: Update plugins/domains/domains_plugin.php around line 1258 from {code:java} $services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'date_renews', 'operator' => '>=', 'value' => $start_date], ['column' => 'date_renews', 'operator' => '<=', 'value' => $end_date] ] ] ); {code} To {code:java} $domains = $this->Record->select()-> from('domains_domains')-> where('expiration_date', '>=', $start_date)-> where('expiration_date', '<=', $end_date)-> fetchAll(); $service_ids = array_values($this->Form->collapseObjectArray($domains, 'service_id', 'service_id')); // Fetch all qualifying services $services = []; if (!empty($service_ids)) { $services = $this->Services->getAll( ['date_added' => 'DESC'], true, [], [ 'services' => [ 'package_group_id' => $settings['domains_package_group'], ['column' => 'id', 'operator' => 'in', 'value' => $service_ids] ] ] ); } {code} |
Jonathan Reissmueller
made changes -
Assignee | Jonathan Reissmueller [ jonathan ] |
Jonathan Reissmueller
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Jonathan Reissmueller
made changes -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Abdy Franco
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 1 hour, 19 minutes [ 4740 ] | |
Worklog Id | 16044 [ 16044 ] |
Abdy Franco
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |