Skip to content

fix(eo): preserve Encrypted Email Count from CSV and trigger delta scan when column is empty - #176

Open
rishiksingh11 wants to merge 2 commits into
google:mainfrom
rishiksingh11:fix/encrypted-emails-csv-scan
Open

rishiksingh11 wants to merge 2 commits into
google:mainfrom
rishiksingh11:fix/encrypted-emails-csv-scan

Conversation

@rishiksingh11

@rishiksingh11 rishiksingh11 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes two bugs when scanning or loading Encrypted Emails in the Exchange Online planner with Upload CSV:

  1. Missing CSV data mapping in _prepare_batch_list():

    • Previously, Encrypted Email Count was initialized to 0 for each row and never copied from existing_data, causing any pre-existing Encrypted Email Count in the uploaded CSV to be reset to 0.
    • Added have_encrypted_email = "Encrypted Email Count" in sample and copied src.get("Encrypted Email Count", 0) when config.scan_encrypted_email is enabled.
  2. Prematurely skipping Delta Scan in _resolve_target_users():

    • Previously, have_encrypted_email (and other resource flags) checked only whether the column header existed in df_input.columns. Since exported user_report_*.csv files include all columns (with 0s for un-scanned resources), re-uploading a report CSV and enabling Encrypted Emails caused have_encrypted_email = True, skipping authentication/ID resolution and resulting in 0 encrypted emails.
    • Updated _resolve_target_users() to check that the column contains non-zero data ((pd.to_numeric(...).fillna(0) > 0).any()), matching the existing has_..._data logic in _run_scan_phases().

Screenshots

1. Configuration Screen (Upload CSV + Encrypted Emails Enabled under Advanced Settings)

Configuration Screen

2. Results View (Encrypted Emails Count Properly Displayed from CSV / Delta Scan)

Results View

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants