feat(native-alarms): optional MesReportable column in the native-source override CSV import (ScadaBridge#102 item 4)

CLI import no longer has to reset MES overrides to inherit; a legacy 4-column file
still parses and the Central UI import keeps the stored flag for it.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 15:31:11 -05:00
parent b540d8ac2c
commit 62fe1e685d
7 changed files with 126 additions and 27 deletions
@@ -84,6 +84,24 @@ public class InstanceConfigureNativeAlarmCsvImportTests
Assert.Null(pump.Filter);
}
/// <summary>Gitea #102: the MesReportable column flows through the import rows.</summary>
[Fact]
public void MesColumn_FlowsThroughToImportRows()
{
var csv = "SourceName,Connection,SourceReference,Filter,MesReportable\n"
+ "BoilerAlarms,,,,true\n"
+ "PumpAlarms,,,,\n";
var parsed = NativeAlarmSourceOverrideCsvParser.Parse(csv);
var outcome = InstanceConfigure.BuildNativeAlarmSourceCsvImport(parsed, Sources());
Assert.False(outcome.HasErrors);
Assert.True(outcome.Rows[0].HasMesColumn);
Assert.True(outcome.Rows[0].MesReportable);
Assert.True(outcome.Rows[1].HasMesColumn);
Assert.Null(outcome.Rows[1].MesReportable);
}
/// <summary>Verifies that a row with all fields blank is marked as a clear.</summary>
[Fact]
public void AllBlankRow_IsMarkedAsClear()