From 550200acf6091d43d10a9aba50f6ff0c7f7a0eb4 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 23 Apr 2019 19:11:44 +0000 Subject: [PATCH] B2019-023 Fixed case sensitive search in Word attachments B2019-016 include RNO step type in the searchable list --- PROMS/DataLoader/PROMSFixes.Sql | 13 +++++++------ PROMS/VEPROMS User Interface/PROMSFixes.Sql | 13 +++++++------ PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/PROMS/DataLoader/PROMSFixes.Sql b/PROMS/DataLoader/PROMSFixes.Sql index f646b76c..847dcdf2 100644 --- a/PROMS/DataLoader/PROMSFixes.Sql +++ b/PROMS/DataLoader/PROMSFixes.Sql @@ -3016,7 +3016,7 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_FindText]') GO /* -SELECT * From vefn_FindText('1','turbine-driven',0,0,0,1,'') +SELECT * From vefn_FindText('8','Dog',1,0,0,1,'') SELECT * From vefn_FindText('1','turbine\u8209?driven',0,0,0,0,'') SELECT * From vefn_FindText('1','trip',0,0,0,0,'') select * from vefn_FindText('1','',0,0,0,1,'20010,20008') @@ -3087,13 +3087,14 @@ ELSE insert into @FoundContents select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchString,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C where - (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CS_AS) + -- B2019-023 moved placement of Collate SQL_Latin1_CP1_CS_AS to before each like statement to enable case sensitive in Word sections + (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) Collate SQL_Latin1_General_CP1_CS_AS like @SearchString) AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/) or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,','))))) UNION select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchStringx,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C where - (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS) + (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) Collate SQL_Latin1_General_CP1_CS_AS like @SearchStringx) AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/) or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,','))))) @@ -3102,7 +3103,7 @@ ELSE join Entries E on C.ContentID = E.ContentID join Documents D on E.DocID = D.DocID where - (Replace(D.DocAscii,nchar(176),'\''B0') like @SearchString OR Replace(D.DocAscii,nchar(176),'\''B0') like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS) + (Replace(D.DocAscii,nchar(176),'\''B0') Collate SQL_Latin1_General_CP1_CS_AS like @SearchString OR Replace(D.DocAscii,nchar(176),'\''B0') Collate SQL_Latin1_General_CP1_CS_AS like @SearchStringx) AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/) or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,','))))) @@ -15000,8 +15001,8 @@ BEGIN TRY -- Try Block set nocount on DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '12/12/2018 07:00 AM' - set @RevDescription = 'UCF Changes' + set @RevDate = '04/23/2019 01:50 PM' + set @RevDescription = 'Case Sensitive Search Fix' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription IF( @@TRANCOUNT > 0 ) COMMIT diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index f646b76c..847dcdf2 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -3016,7 +3016,7 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_FindText]') GO /* -SELECT * From vefn_FindText('1','turbine-driven',0,0,0,1,'') +SELECT * From vefn_FindText('8','Dog',1,0,0,1,'') SELECT * From vefn_FindText('1','turbine\u8209?driven',0,0,0,0,'') SELECT * From vefn_FindText('1','trip',0,0,0,0,'') select * from vefn_FindText('1','',0,0,0,1,'20010,20008') @@ -3087,13 +3087,14 @@ ELSE insert into @FoundContents select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchString,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C where - (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CS_AS) + -- B2019-023 moved placement of Collate SQL_Latin1_CP1_CS_AS to before each like statement to enable case sensitive in Word sections + (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) Collate SQL_Latin1_General_CP1_CS_AS like @SearchString) AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/) or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,','))))) UNION select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchStringx,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C where - (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS) + (.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) Collate SQL_Latin1_General_CP1_CS_AS like @SearchStringx) AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/) or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,','))))) @@ -3102,7 +3103,7 @@ ELSE join Entries E on C.ContentID = E.ContentID join Documents D on E.DocID = D.DocID where - (Replace(D.DocAscii,nchar(176),'\''B0') like @SearchString OR Replace(D.DocAscii,nchar(176),'\''B0') like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS) + (Replace(D.DocAscii,nchar(176),'\''B0') Collate SQL_Latin1_General_CP1_CS_AS like @SearchString OR Replace(D.DocAscii,nchar(176),'\''B0') Collate SQL_Latin1_General_CP1_CS_AS like @SearchStringx) AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/) or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,','))))) @@ -15000,8 +15001,8 @@ BEGIN TRY -- Try Block set nocount on DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '12/12/2018 07:00 AM' - set @RevDescription = 'UCF Changes' + set @RevDate = '04/23/2019 01:50 PM' + set @RevDescription = 'Case Sensitive Search Fix' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription IF( @@TRANCOUNT > 0 ) COMMIT diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index f855e3a0..549768bb 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -593,7 +593,7 @@ namespace VEPROMS.CSLA.Library List sds = new List(); foreach (StepData sd in StepDataList) { - if (!sd.Inactive && sd.StepEditData.Searchable && sd.StepEditData.TypeMenu.InMenu) + if (!sd.Inactive && sd.StepEditData.Searchable && (sd.StepEditData.TypeMenu.InMenu || sd.Index == 40)) // B2019-016 allow to specify Search of RNO step type sds.Add(new StepDataRetval(sd.StepEditData.TypeMenu.MenuItem, Convert.ToInt32(sd.Index))); } // now add any from the inherited list (but only if type is not in the list)