Calc item delete fix for Robson S.

This commit is contained in:
Christian Wade 2020-04-23 19:00:12 -07:00
parent d04aefa31a
commit de12f24fa4
8 changed files with 13 additions and 14 deletions

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.4.1")] [assembly: AssemblyVersion("5.0.4.2")]
[assembly: AssemblyFileVersion("5.0.4.1")] [assembly: AssemblyFileVersion("5.0.4.2")]

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.4.1")] [assembly: AssemblyVersion("5.0.4.2")]
[assembly: AssemblyFileVersion("5.0.4.1")] [assembly: AssemblyFileVersion("5.0.4.2")]

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.4.1")] [assembly: AssemblyVersion("5.0.4.2")]
[assembly: AssemblyFileVersion("5.0.4.1")] [assembly: AssemblyFileVersion("5.0.4.2")]

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.4.1")] [assembly: AssemblyVersion("5.0.4.2")]
[assembly: AssemblyFileVersion("5.0.4.1")] [assembly: AssemblyFileVersion("5.0.4.2")]

View File

@ -828,7 +828,7 @@ namespace BismNormalizer.TabularCompare.TabularMetadata
{ {
foreach (ComparisonObject childComparisonObject in comparisonObject.ChildComparisonObjects) foreach (ComparisonObject childComparisonObject in comparisonObject.ChildComparisonObjects)
{ {
DeleteCalculationItem(childComparisonObject); //CalculationItem DeleteCalculationItem(childComparisonObject, comparisonObject.SourceObjectName); //CalculationItem, Table
} }
} }
@ -1811,20 +1811,19 @@ namespace BismNormalizer.TabularCompare.TabularMetadata
#region CalculationItems #region CalculationItems
private void DeleteCalculationItem(ComparisonObject comparisonObject) private void DeleteCalculationItem(ComparisonObject comparisonObject, string tableName)
{ {
if ((comparisonObject.ComparisonObjectType == ComparisonObjectType.CalculationItem || comparisonObject.ComparisonObjectType == ComparisonObjectType.Kpi) && if ((comparisonObject.ComparisonObjectType == ComparisonObjectType.CalculationItem || comparisonObject.ComparisonObjectType == ComparisonObjectType.Kpi) &&
comparisonObject.MergeAction == MergeAction.Delete) comparisonObject.MergeAction == MergeAction.Delete)
{ {
foreach (Table tableTarget in _targetTabularModel.Tables) Table tableTarget = _targetTabularModel.Tables.FindByName(tableName);
if (tableTarget != null)
{ {
CalculationItem calculationItemTarget = tableTarget.CalculationItems.FindByName(comparisonObject.TargetObjectInternalName); CalculationItem calculationItemTarget = tableTarget.CalculationItems.FindByName(comparisonObject.TargetObjectInternalName);
if (calculationItemTarget != null) if (calculationItemTarget != null)
{ {
// CalculationItem may have already been deleted if parent table was deleted // CalculationItem may have already been deleted if parent table was deleted
tableTarget.DeleteCalculationItem(comparisonObject.TargetObjectInternalName); tableTarget.DeleteCalculationItem(comparisonObject.TargetObjectInternalName);
break;
} }
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011"> <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata> <Metadata>
<Identity Id="BismNormalizer.ea2aeb43-64a6-4dee-8816-099fb44513fa" Version="5.0.4.1" Language="en-US" Publisher="BISM Normalizer" /> <Identity Id="BismNormalizer.ea2aeb43-64a6-4dee-8816-099fb44513fa" Version="5.0.4.2" Language="en-US" Publisher="BISM Normalizer" />
<DisplayName>BISM Normalizer</DisplayName> <DisplayName>BISM Normalizer</DisplayName>
<Description xml:space="preserve">BISM Normalizer manages Analysis Services tabular models</Description> <Description xml:space="preserve">BISM Normalizer manages Analysis Services tabular models</Description>
<MoreInfo>http://bism-normalizer.com/</MoreInfo> <MoreInfo>http://bism-normalizer.com/</MoreInfo>