Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4784

Domain Manager: Expiration notice is based on renew date instead of expiration

    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

        There are no comments yet on this issue.

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Nov/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 19 minutes
              1h 19m

                Agile