diff --git a/SCSM-Diagnostic-Tool/SourceCode/_1_Collecting/Collect_OnlyMgmtServerSpecificInfo/Collect_FromWFAndSecondary/Collect_SQL_MS_Specific.ps1 b/SCSM-Diagnostic-Tool/SourceCode/_1_Collecting/Collect_OnlyMgmtServerSpecificInfo/Collect_FromWFAndSecondary/Collect_SQL_MS_Specific.ps1 index 46ac1cf..4c17b30 100644 --- a/SCSM-Diagnostic-Tool/SourceCode/_1_Collecting/Collect_OnlyMgmtServerSpecificInfo/Collect_FromWFAndSecondary/Collect_SQL_MS_Specific.ps1 +++ b/SCSM-Diagnostic-Tool/SourceCode/_1_Collecting/Collect_OnlyMgmtServerSpecificInfo/Collect_FromWFAndSecondary/Collect_SQL_MS_Specific.ps1 @@ -610,9 +610,29 @@ order by 5 desc '@ $SQL_SCSM_MS['SQL_ObjectTemplates_WithMissingLocalizations']=@' ---show Templates which do not have any localized string which would cause Connector (e.g. Exchange Connector) Wizard to crash (Bug 936430) -select * from ObjectTemplate ot -where not exists (select * from LocalizedText lt where ot.ObjectTemplateId = lt.LTStringId and LTStringType=1) +--show IR,SR Templates which do not have any localized string and would therefore cause the Exchange Connector Wizard to crash (Bug 936430) +select +ObjectTemplateName as "Template Name to be edited" +, ltMT.LTValue as BasedOnClass_DisplayName_ENU, ot.ManagementPackId +from ObjectTemplate ot +left join TypeProjection tp on ot.ObjectTemplateTypeId=tp.TypeProjectionId +left join ManagedType mt on TypeProjectionSeed=mt.ManagedTypeId +left join LocalizedText lt on ot.ObjectTemplateId = lt.LTStringId and lt.LTStringType=1 and lt.LanguageCode='ENU' +left join LocalizedText ltMT on mt.ManagedTypeId = ltMT.LTStringId and ltMT.LTStringType=1 and ltMT.LanguageCode='ENU' +left join LocalizedText ltTP on tp.TypeProjectionId = ltTP.LTStringId and ltTP.LTStringType=1 and ltTP.LanguageCode='ENU' +where lt.ltvalue is null +and mt.TypeName in ('System.WorkItem.Incident','System.WorkItem.ServiceRequest') +union all +select +ObjectTemplateName as Template_Name, ltMT.LTValue as BasedOnClass_DisplayName_ENU, ot.ManagementPackId +from ObjectTemplate ot +inner join ManagedType mt on ot.ObjectTemplateTypeId=mt.ManagedTypeId +left join LocalizedText lt on ot.ObjectTemplateId = lt.LTStringId and lt.LTStringType=1 and lt.LanguageCode='ENU' +left join LocalizedText ltMT on mt.ManagedTypeId = ltMT.LTStringId and ltMT.LTStringType=1 and ltMT.LanguageCode='ENU' +where ot.ObjectTemplateTypeId != '0814D9A7-8332-A5DF-2EC8-34D07F3D40DB' -- != System.Notification.Template.SMTP +and lt.ltvalue is null +and mt.TypeName in ('System.WorkItem.Incident','System.WorkItem.ServiceRequest') +order by 1 '@ $SQL_SCSM_MS['SQL_fn_GetEntityChangeLogGroomingWatermark']=@' diff --git a/SCSM-Diagnostic-Tool/SourceCode/_2_Analyzing/Analyze_ForWFAndSecondary/Check_ObjectTemplates_WithNoLocalizations.ps1 b/SCSM-Diagnostic-Tool/SourceCode/_2_Analyzing/Analyze_ForWFAndSecondary/Check_ObjectTemplates_WithNoLocalizations.ps1 index e6a88d8..fac9fc2 100644 --- a/SCSM-Diagnostic-Tool/SourceCode/_2_Analyzing/Analyze_ForWFAndSecondary/Check_ObjectTemplates_WithNoLocalizations.ps1 +++ b/SCSM-Diagnostic-Tool/SourceCode/_2_Analyzing/Analyze_ForWFAndSecondary/Check_ObjectTemplates_WithNoLocalizations.ps1 @@ -1,13 +1,21 @@ function Check_ObjectTemplates_WithNoLocalizations() { $dataRow = GetEmptyResultRow - $dataRow.RuleName="Templates with no localizations" + $dataRow.RuleName="IR and SR Templates with no localizations" $dataRow.RuleDesc=@" -This rule checks if Templates exist that do not have any localized string. This would cause Connector (e.g. Exchange Connector) Wizard to crash the Console (bug 936430). +This rule checks if Templates (only if based on Incident or Service Request) exist that do not have any localized Name or Description value. This would crash the Console (bug 936430) when attempting to create a new Exchange Connector or when opening an existing one. "@ $dataRow.RuleResult="No such templates found." $dataRow.SAPCategories = "Console" - $dataRow.ProblemSeverity=[ProblemSeverity]::Error + + $connectors = ConvertFrom-Csv (GetSanitizedCsv (GetFileContentInSourceFolder SQL_Connectors.csv) ) + $exchangeConnectors = $connectors | ? { $_.'Data Provider Name' -eq "Exchange Connector"} + if ($exchangeConnectors.Count -eq 0) { + $dataRow.ProblemSeverity=[ProblemSeverity]::Warning + } + else { + $dataRow.ProblemSeverity=[ProblemSeverity]::Error + } $linesIn_SQL_ObjectTemplates_WithMissingLocalizations = ConvertFrom-Csv (GetSanitizedCsv ( GetFileContentInSourceFolder SQL_ObjectTemplates_WithMissingLocalizations.csv ) ) @@ -16,8 +24,23 @@ This rule checks if Templates exist that do not have any localized string. This } else { $dataRow.RuleResult = @" - Looks like problematic templates found. Please check in $(CollectorLink SQL_ObjectTemplates_WithMissingLocalizations.csv). $(IgnoreRuleIfText) no Exchange Connector exists. However, it is strongly suggested to add localized string values to these templates to avoid problems in the future. + Looks like problematic templates found. To resolve this issue, please do the following steps: +
1. Open $(CollectorLink SQL_ObjectTemplates_WithMissingLocalizations.csv). +
2. Copy the value of the 1st column "Template Name to be edited". +
3. Open the SM console and navigate to Library/Templates. +
4. Find/Filter the template (like "Template.59d3859b0aca4bd0aec5f64e3b6059e2") and click Properties. +
5. Make a modification in the Name or Description fields. +
6. Uncheck the "When I click OK, open the template form" checkbox at the very end. Don't worry if you forget to uncheck. +
7. Click the OK button. +
Repeat steps 2-7 for each row in $(CollectorLink SQL_ObjectTemplates_WithMissingLocalizations.csv). +"@ + + if ($exchangeConnectors.Count -eq 0) { + $dataRow.RuleResult += @" +
+
$(IgnoreRuleIfText) you do not plan to create an Exchange Connector. However, it is strongly recommended to do the steps mentioned above, in order to avoid problems in the future. "@ + } $Result_Problems += $dataRow } } \ No newline at end of file