Added GetAffectedROUsages
This commit is contained in:
parent
c8bbc9e228
commit
47d6925187
@ -3158,6 +3158,63 @@ IF (@@Error = 0) PRINT 'Procedure Creation: existsZTransition Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: existsZTransition Error on Creation'
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [getAffectedRoUsages] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAffectedRoUsages]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [getAffectedRoUsages];
|
||||
GO
|
||||
|
||||
/*
|
||||
getAffectedROUsages 1, '00010000019c0000', 'KBR Test', 'Changed', 'KBR'
|
||||
*/
|
||||
CREATE PROCEDURE [dbo].[getAffectedRoUsages]
|
||||
|
||||
(
|
||||
@RODbID int,
|
||||
@ROID nvarchar(16),
|
||||
@RODesc nvarchar(MAX),
|
||||
@Command nvarchar(10),
|
||||
@UserID nvarchar(100)
|
||||
)
|
||||
AS
|
||||
--if @Command='Deleted'
|
||||
BEGIN
|
||||
DECLARE @typeID int
|
||||
SELECT @typeID = TypeID from AnnotationTypes where Name = 'Verification Required'
|
||||
-- Add "Verification Required" Annotation for each ROUsage
|
||||
INSERT INTO [Annotations] ([ItemID],[TypeID],[SearchText],[UserID])
|
||||
SELECT ItemID, @typeID,'Referenced Object (' + @RODesc + ') ' + @Command,@UserID
|
||||
FROM Items where CONTENTID in (SELECT ContentID FROM ROUSAGES
|
||||
where RODbID = @RODbID AND SUBSTRING(ROID,1,12) = SUBSTRING(@ROID,1,12))
|
||||
END
|
||||
SELECT
|
||||
[RoUsages].[ROUsageID],
|
||||
[RoUsages].[ContentID],
|
||||
[RoUsages].[ROID],
|
||||
[RoUsages].[Config],
|
||||
[RoUsages].[DTS],
|
||||
[RoUsages].[UserID],
|
||||
[RoUsages].[LastChanged],
|
||||
[RoUsages].[RODbID],
|
||||
[Contents].[Number] [Content_Number],
|
||||
[Contents].[Text] [Content_Text],
|
||||
[Contents].[Type] [Content_Type],
|
||||
[Contents].[FormatID] [Content_FormatID],
|
||||
[Contents].[Config] [Content_Config],
|
||||
[Contents].[DTS] [Content_DTS],
|
||||
[Contents].[UserID] [Content_UserID]
|
||||
FROM [RoUsages]
|
||||
JOIN [Contents] ON
|
||||
[Contents].[ContentID]=[RoUsages].[ContentID]
|
||||
WHERE
|
||||
[RoUsages].[RODbID]=@RODbID AND [RoUsages].[ROID]=@ROID
|
||||
|
||||
RETURN
|
||||
GO
|
||||
-- Display the status of Proc creation
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: getAffectedRoUsages Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: getAffectedRoUsages Error on Creation'
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [getAffectedTransitions] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAffectedTransitions]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [getAffectedTransitions];
|
||||
@ -11811,6 +11868,7 @@ exec vesp_SearchItemAndChildrenNew '','','PORV NEAR SG',2,0,0,0
|
||||
exec vesp_SearchItemAndChildrenNew '','','CHECK NORMAL',0,0,0,0
|
||||
exec vesp_SearchItemAndChildrenNew '','','(Resolved Transition Text)',0,0,0,0
|
||||
*/
|
||||
|
||||
CREATE PROCEDURE [dbo].[vesp_SearchItemAndChildrenNew] (@DocVersionList varchar(MAX), @StepTypeList varchar(MAX),
|
||||
@SearchString varchar(MAX), @CaseSensitive as int, @IncludeLinks as int, @IncludeRtfFormatting as int, @IncludeSpecialCharacters as int)
|
||||
WITH EXECUTE AS OWNER
|
||||
|
Loading…
x
Reference in New Issue
Block a user