B2019-023 Fixed case sensitive search in Word attachments

B2019-016 include RNO step type in the searchable list
This commit is contained in:
John Jenko 2019-04-23 19:11:44 +00:00
parent 31c744af4b
commit 550200acf6
3 changed files with 15 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -593,7 +593,7 @@ namespace VEPROMS.CSLA.Library
List<StepDataRetval> sds = new List<StepDataRetval>();
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)