SFDO-Community / declarative-lookup-rollup-summaries

Declarative Lookup Rollup Summaries (DLRS) is a community built and maintained Salesforce application that allows you to create cross object roll-ups declaratively - no code! For install instructions and documentation, visit our website https://sfdo-community-sprints.github.io/DLRS-Documentation/
https://sfdo-community-sprints.github.io/DLRS-Documentation/
BSD 3-Clause "New" or "Revised" License
690 stars 237 forks source link

Optimizer Check - Modify `LookupRollupSummaryScheduleItemsCount` to filter older records #1395

Open sfenton3 opened 11 months ago

sfenton3 commented 11 months ago

Is your feature request related to a problem? Please describe. Currently, the code in OptimzerService.cls for LookupRollupSummaryScheduleItemsCount checks if you have a scheduled apex job and if the schedule items count is over 5000. We should split this functionality into two separate optimizer checks/warnings. This issue is to refactor this code the LookupRollupSummaryScheduleItemsCount method to only warn users if there are more than 5000 scheduled item records that are greater than 3 days old.

Describe the solution you'd like Remove the query to check if the Apex job is processing or queued. Edit the SOQL query to get the count of all scheduled items that are created three days or older from today.

Additional context This issue shows users struggling with understanding scheduled items. Link