C2025-013 Option to Disable “Message Prompt when a Summary will open in MS Word”

This commit is contained in:
2025-05-19 15:37:46 -04:00
parent df97a6dd01
commit eacdca8669
10 changed files with 659 additions and 280 deletions

View File

@@ -23811,6 +23811,59 @@ IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettings Succeeded'
ELSE PRINT 'Running vesp_UpdateUserSettings Failed to Execute'
GO
-- =============================================
-- Author: Matthew Schill
-- Create date: 5/19/2025
-- Description: Allow option to not prompt user with MS Word messages
-- when generating Summaries
-- =============================================
--- MSWordSummaryPrompt = ahouls user be prompted with message?
-- default = yes (true)
IF NOT EXISTS(SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Users'
AND COLUMN_NAME = 'MSWordSummaryPrompt')
ALTER TABLE Users ADD MSWordSummaryPrompt bit NOT NULL DEFAULT(1);
go
-- Display the status
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for MSWordSummaryPrompt'
ELSE PRINT 'Altered table [Users] Error on Alter for MSWordSummaryPrompt'
go
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateUserSettingMSWordSummaryPrompt]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_UpdateUserSettingMSWordSummaryPrompt];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Matthew Schill
-- Create date: 5/19/2025
-- Description: Allow option to not prompt user with MS Word messages
-- when generating Summaries
-- =============================================
CREATE PROCEDURE [dbo].[vesp_UpdateUserSettingMSWordSummaryPrompt]
(
@UID varchar(100),
@Prompt bit = null
)
WITH EXECUTE AS OWNER
AS
UPDATE Users SET
MSWordSummaryPrompt = ISNULL(@Prompt, MSWordSummaryPrompt)
WHERE UserID =@UID
RETURN
GO
IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettingMSWordSummaryPrompt Succeeded'
ELSE PRINT 'Running vesp_UpdateUserSettingMSWordSummaryPrompt Failed to Execute'
GO
/*
---------------------------------------------------------------------------
| ADD New Code Before this Block |
@@ -23844,8 +23897,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '4/03/2025 6:14 PM'
set @RevDescription = 'B2022-031 Add filtering for Proc and Section name from Global Search'
set @RevDate = '5/19/2025 8:44 AM'
set @RevDescription = 'C2025-013 Add ability to disable message that opening Summaries in MS Word'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription