- CoveAccount staging model: all Cove accounts upserted from API;
unmatched accounts visible on /cove/accounts before job linking
- cove_importer.py: always upserts accounts, creates JobRuns only for
accounts with a linked job (deduplication via external_id)
- routes_cove.py: GET /cove/accounts, POST link/unlink routes
- cove_accounts.html: inbox-style page with Bootstrap modals for
creating new jobs or linking to existing ones
- Nav bar: Cove Accounts link for admin/operator when cove_enabled
- DB migration: migrate_cove_accounts_table() for staging table
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New route POST /settings/cove/run-now calls run_cove_import()
directly and shows result as flash message
- Settings > Integrations > Cove: "Run import now" button visible
when partner_id is known (connection confirmed)
- Status bar shows partner ID, last import timestamp or "No import yet"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New models: SystemSettings gets 8 cove_* fields, Job gets
cove_account_id, JobRun gets source_type and external_id
- Migration migrate_cove_integration() adds all new DB columns and
a deduplication index on job_runs.external_id
- cove_importer.py: Cove API login, paginated EnumerateAccountStatistics,
deduplication via external_id, JobRun creation, per-datasource
run_object_links persistence (Files&Folders, VssMsSql, M365, etc.)
- cove_importer_service.py: background thread, same pattern as
auto_importer_service, respects cove_import_interval_minutes
- __init__.py: starts cove_importer thread on app startup
- routes_settings.py: Cove form handling (POST), has_cove_password
variable, new AJAX route /settings/cove/test-connection
- routes_jobs.py: new route /jobs/<id>/set-cove-account,
cove_enabled passed to job_detail template
- settings.html: Cove card in Integrations tab with AJAX test button
- job_detail.html: Cove Integration card with Account ID input
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add standalone cove_api_test.py to verify new D9Fxx/D10Fxx/D11Fxx column codes
- D02/D03 confirmed as legacy by N-able support; D9/D10/D11 should work
- Document session status codes (F00) and timestamp fields (F09/F15/F18)
- Update TODO and knowledge docs with breakthrough status
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added autocomplete="off" attribute to all checkboxes to prevent browser from
automatically restoring checkbox states after page reload.
Changes:
- Inbox page: Added autocomplete="off" to select-all and row checkboxes
- Run Checks page: Added autocomplete="off" to select-all and row checkboxes
This fixes the issue where after deleting items, the browser would automatically
re-select the same number of checkboxes that were previously selected, causing
unwanted selections on the reloaded page.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added ticket linking to missed runs by calling link_open_internal_tickets_to_run
after creating missed JobRun records in _ensure_missed_runs_for_job function.
Changes:
- Added import for link_open_internal_tickets_to_run in routes_run_checks.py
- Added db.session.flush() and ticket linking call after creating weekly missed runs
- Added db.session.flush() and ticket linking call after creating monthly missed runs
- Ensures missed runs receive same ticket propagation as email-based runs
This fixes the issue where missed runs were not showing linked internal tickets
or Autotask tickets, while error/warning runs from emails were working correctly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed issue where Autotask internal tickets were not being linked to new runs.
This resolves the problem identified on 2026-02-11.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Moved clipboard functions (copyToClipboard, fallbackCopy, showCopyFeedback)
inside IIFE scope for proper closure access. Edge browser is stricter than
Firefox about scope resolution - functions must be in same scope as event
listeners that call them.
Previously these functions were in global scope while event listeners were
in IIFE scope, which worked in Firefox but failed silently in Edge.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Extended /api/job-runs/<run_id>/alerts endpoint to include both:
- Tickets explicitly linked to run via ticket_job_runs (audit trail)
- Tickets linked to job via ticket_scopes (active on run date)
Previously only ticket_job_runs was queried, causing newly created
tickets to not appear in the Meldingen section of the Run Checks modal.
They would only appear after being resolved (which creates a
ticket_job_runs entry). Now both sources are queried and duplicates
are prevented.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Critical bug: Same ticket appeared multiple times in popup
(e.g., T20260127.0061 showed 8 times).
Root Cause:
The JOIN with ticket_scopes/remark_scopes created duplicate rows
when a ticket had multiple scopes (Cartesian product).
Changes:
- Removed unnecessary JOIN ticket_scopes from tickets query
- Removed unnecessary JOIN remark_scopes from remarks query
- Added DISTINCT to prevent any duplicate rows
- Changed COALESCE(ts.resolved_at, t.resolved_at) to t.resolved_at
(ticket_scopes JOIN removed, only ticket resolution matters)
Result: Each ticket/remark now appears exactly once in popup.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The UI text still mentioned "3 emails simulating Veeam, Synology,
and NAKIVO" but the actual behavior changed to 1 Veeam email per button.
Changes:
- Updated description: Now states "1 Veeam Backup Job email" per button
- Updated button labels: "emails (3)" → "email (1)"
- Clarified that only Veeam test emails are generated
This matches the actual implementation that was changed earlier.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Prepared official release documentation for v0.1.26 consolidating
all ticket system bug fixes from 2026-02-10.
Changes:
- Updated docs/changelog.md with v0.1.26 release notes
- Detailed root cause analysis of date-based logic issues
- Complete list of fixed pages (4 locations)
- Before/after behavior explanation
- Testing and troubleshooting section
- Updated changelog.py with v0.1.26 entry for website display
- Same content structured for Python data format
- Updated changelog-claude.md with release reference
Release Focus:
- Complete transition from date-based to link-based ticket queries
- Fixed resolved tickets appearing on new runs (4 pages affected)
- Preserved audit trail for historical runs
- Consistent behavior across entire application
Ready for production deployment.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The previous changelog entry lacked context about why debug logging
was added and what it did. Future readers need this information.
Changes:
- Restored full debug logging description in Changed section
- Marked as "LATER REMOVED" for clarity
- Expanded Removed section with full context about purpose
- Now clear: logging was temporary troubleshooting tool
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The ticket propagation issues have been resolved. Debug logging
is no longer needed in production code.
Changes:
- Removed AuditLog debug logging from link_open_internal_tickets_to_run
- Preserved debug logging code in backupchecks-system.md for future use
- Updated changelog to document removal
The debug code is available in the technical documentation if
troubleshooting is needed again in the future.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The Run Checks popup modal was still showing resolved tickets
for runs where they were never actually linked. This was the last
remaining location using date-based ticket logic.
Root cause:
The /api/job-runs/<run_id>/alerts endpoint used the old date-based
logic that showed all tickets scoped to the job if active_from_date
was before the run date. This ignored whether the ticket was actually
linked to that specific run.
Changes:
- Replaced date-based query with explicit ticket_job_runs join
- Replaced date-based query with explicit remark_job_runs join
- Now only returns tickets/remarks actually linked to this run
- Removed unused run_date, job_id, ui_tz query parameters
- Simplified queries: no timezone conversions, no date comparisons
Result: Resolved tickets no longer appear in popup unless they were
linked to that run when they were still open. Completes transition
from date-based to explicit-link ticket system across entire UI.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The Run Checks main page has ticket/remark indicators (🎫/💬) that
use queries to check if active tickets/remarks exist for each job.
These queries still used the old date-based logic.
Changes:
- Removed date-based OR clause from ticket indicator query
- Removed date-based OR clause from remark indicator query
- Simplified parameters (removed ui_tz from ticket query)
- Now consistent with Job Details and linking behavior
Result: Run Checks indicators no longer show for resolved tickets,
matching the behavior across all pages.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Previous fix removed ALL resolved tickets from display, breaking
audit trail. Users need to see which tickets were associated with
historical runs, even after resolution.
Solution: Two-source ticket display
1. Direct links (ticket_job_runs): Always show, even if resolved
- Preserves audit trail
- Shows tickets that were explicitly linked to runs
2. Active window (ticket_scopes): Only show unresolved
- Prevents resolved tickets from appearing on NEW runs
- Uses active_from_date without date-based resolved logic
Changes:
- Added direct_ticket_links map to fetch linked tickets per run
- Query ticket_job_runs for audit trail tickets
- Modified ticket_codes building to use both sources
- Removed date-based resolved_date comparison (resd >= rd)
Result:
- Run 1 with ticket → ticket resolved → ticket still visible on Run 1
- Run 2 created → ticket NOT shown on Run 2 (correctly filtered)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The Job Details page used the same date-based logic that was causing
resolved tickets to appear for runs on the same day as the resolve date.
The linking was already fixed in ticketing_utils.py, but the display
query in routes_jobs.py still used the old logic, causing a mismatch:
- New runs were correctly NOT linked to resolved tickets
- But the UI still SHOWED resolved tickets due to the display query
Changes:
- Removed date-based OR clause from tickets query (line 201-204)
- Removed date-based OR clause from remarks query (line 239-242)
- Simplified query parameters (removed min_date and ui_tz)
- Now both linking AND display use consistent logic: resolved = hidden
Result: Resolved tickets and remarks no longer appear in Job Details
or any other view, matching the expected behavior.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
User requested simpler test scenario with just 1 email per status
instead of 3, making testing and debugging easier.
Changes:
- Success: 1 email instead of 3
- Warning: 1 email instead of 3
- Error: 1 email instead of 3
- Each button now creates exactly 1 test mail
- Kept the most recent email (2026-02-09) from each set
This makes it easier to test ticket linking behavior without having
to deal with multiple runs per test cycle.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Previous debug code only logged when tickets were found, making it
impossible to verify that the function was being called at all.
Changes:
- Move logging outside the if rows: block
- Always create audit log entry for every run import
- Log "No open tickets found" when rows is empty
- Use commit() instead of flush() to ensure persistence
- Add exception logging to catch any errors in debug code
- New event_type "ticket_link_error" for debug code failures
Now every email import will create a ticket_link_debug entry showing:
- Whether the function was called
- How many tickets were found (0 or more)
- Details of each ticket if found
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Flask logger output was not visible in Portainer logs or Logging page.
Changed to write debug info to audit_logs table instead, which is
visible on the Logging page in the UI.
Changes:
- Debug entries use event_type "ticket_link_debug"
- User field set to "system"
- Details field contains ticket info (one per line)
- Visible on Settings → Logging page
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>