Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.9.3</Version>
<Version>10.12.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>Ecom Provider</Title>
<Description>Ecom Provider</Description>
Expand All @@ -24,8 +24,8 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dynamicweb.DataIntegration" Version="10.9.0" />
<PackageReference Include="Dynamicweb.Ecommerce" Version="10.9.0" />
<PackageReference Include="Dynamicweb.DataIntegration" Version="10.12.0" />
<PackageReference Include="Dynamicweb.Ecommerce" Version="10.12.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions src/EcomDestinationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@
var mappingColumns = ColumnMappingsByMappingId[mapping.GetId()];
foreach (ColumnMapping columnMapping in mappingColumns)
{
if ((columnMapping.DestinationColumn is not null && columnMapping.SourceColumn is not null && row.ContainsKey(columnMapping.SourceColumn.Name)) || columnMapping.HasScriptWithValue)

Check warning on line 1051 in src/EcomDestinationWriter.cs

View workflow job for this annotation

GitHub Actions / call-workflow / Build

'ColumnMapping.HasScriptWithValue' is obsolete: 'Use ScriptTypeProvider.DisableSource instead.'
{
if (mapping.DestinationTable.Name.Equals("EcomStockUnit", StringComparison.OrdinalIgnoreCase) && columnMapping.DestinationColumn is not null && columnMapping.DestinationColumn.Name.Equals("StockUnitStockLocationId", StringComparison.OrdinalIgnoreCase))
{
Expand Down Expand Up @@ -4425,7 +4425,7 @@

private string? GetValue(ColumnMapping? columnMapping, Dictionary<string, object> row)
{
string? result = null;
string? result = null;
if (columnMapping != null && (columnMapping.HasScriptWithValue || row.ContainsKey(columnMapping.SourceColumn.Name)))
{
switch (columnMapping.ScriptType)
Expand All @@ -4434,10 +4434,10 @@
result = Converter.ToString(row[columnMapping.SourceColumn.Name]);
break;
case ScriptType.Append:
result = Converter.ToString(row[columnMapping.SourceColumn.Name]) + columnMapping.ScriptValue;
result = Converter.ToString(row[columnMapping.SourceColumn.Name]) + Converter.ToString(columnMapping.ScriptTypeProvider?.GetValue(""));
break;
case ScriptType.Prepend:
result = columnMapping.ScriptValue + Converter.ToString(row[columnMapping.SourceColumn.Name]);
result = Converter.ToString(columnMapping.ScriptTypeProvider?.GetValue("")) + Converter.ToString(row[columnMapping.SourceColumn.Name]);
break;
case ScriptType.Constant:
result = columnMapping.GetScriptValue();
Expand Down
Loading