-
-
Notifications
You must be signed in to change notification settings - Fork 436
Automation references the wrong table name causing errors #5315
Copy link
Copy link
Closed
Labels
automationAutomation related issueAutomation related issuebugUndesired behaviourUndesired behaviourconfirmedBug is confirm by dev teamBug is confirm by dev teamporting requiredRequires porting to developRequires porting to developresolvedA fixed issueA fixed issue
Milestone
Description
Describe the bug
When setting a "monthly" or "monthly on day" schedule for a network scan automation, you will get SQL errors in the logs, telling that the "analytics_report_templates" table does not exist.
Indeed it is referenced only on that particular place in the code, i found it nowhere else.
Probably a relic from the past? - might be, so the lines can probably be removed.
Here's the code that causes the error, starting around line 3899 in lib/api_automation.php:
db_execute_prepared('UPDATE analytics_report_templates
SET next_start = ?
WHERE id = ?',
array(date('Y-m-d H:i', $next), $network_id));
We're on cacti 1.2.23, code part is still present in 24 and wasn't touched for a long time.
To Reproduce
Steps to reproduce the behavior:
- Go to Automation -> Networks
- Create any discovery with a schedule of "Monthly" or "Monthly on Day"
- activate it
- check logs for: "CMDPHP ERROR: A DB Exec Failed!, Error: Table 'cacti.analytics_report_templates' doesn't exist"
Expected behavior
Obviously, errors should not appear. ;)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
automationAutomation related issueAutomation related issuebugUndesired behaviourUndesired behaviourconfirmedBug is confirm by dev teamBug is confirm by dev teamporting requiredRequires porting to developRequires porting to developresolvedA fixed issueA fixed issue