We have made some backend customizations to our site, which are lost after Spitfire updates. How can we make these customizations reapply automatically after an update?
Backend customizations are those made using TSQL commands to directly modify the sfPMS configuration data. Backend customizations do not include configurations made through Spitfire tools (i.e., the Code Maintenance, Rules Maintenance and UI Configuration tools found on the System Admin Dashboard). Changes to your site made through the System Admin tools are generally protected and persist from one minor update to another. Backend customizations may not.
To protect your backend customizations, there are two choices.
1) Resources distributed by Spitfire are re-initialized by design during many minor updates, but when the System Admin tools are used for configuration, the GUID for the edited resource entries are also written to the xsfStaticResource table. Once the GUID for an entry is in that table, the SF re-initialization will skip that resource entry. So, if you made a manual, backend customization through SQL, you can enter the GUID for what was changed into the xsfStaticResource table.
The following command shows if Static Resource entries matching the code entry keys already exist:
selecttop 9 *from xsfStaticResource r where r.ResourceKey in
(SELECT CodeValueKey FROM dbo.xsfCodeList WHERE SetName = ‘InclusionType‘)
2) For other types of customizations to which the xsfStaticResource solution doesn‘t apply, ICTool uses Site_Wrapup.sql, a file that contains a SQL script to be run after each update is Finished. This provides the ultimate in site customization scripting. However, we recommend option #1 whenever possible.
For information about the Site_Wrapup.sql script, see KBA-01137 and KBA-01325.
Here are some TSQL hints to help:
If you are updating some code descriptions manually, you must know where these particular codes are stored (e.g., xsfCodeList) and the specific Set name (e.g., InclusionType). The following query will both display the code/descriptions and create some helpful commands.
SELECT *, ‘update c set descript = ‘‘‘ + Descript
+ ‘‘‘ from xsfCodeList c where c.codevaluekey = ‘‘‘
+ CAST(CodeValueKey as varchar(44)) + ‘‘‘ and descript <> ‘‘‘ + Descript + ‘‘‘‘ as ReUpdate
, ‘insert into dbo.xsfStaticResource VALUES(‘‘‘
+ CAST(CodeValueKey as varchar(44)) + ‘‘‘,‘‘custom descript‘‘,1,0,1,default);‘ as MakeStatic
FROM dbo.xsfCodeList WHERE SetName = ‘InclusionType‘
The last column in the output created above (MakeStatic) creates INSERT commands suitable for creating the required xsfStaticResource entries to protect your custom descriptions. You can run these INSERT commands to insert the code GUIDS into the xsfStaticResource table and they will not be henceforth refreshed.
insert into dbo.xsfStaticResource VALUES(‘7462BB56-B515-432B-944D-F83A3CF322D9‘,‘custom descript‘,1,0,1,default);
insert into dbo.xsfStaticResource VALUES(‘3DADA4B0-BE29-438B-8FB9-FDCEA3802B39‘,‘custom descript‘,1,0,1,default);
The second to last column in the output created by the first command above creates UPDATE commands suitable for re-applying your customized descriptions. These commands could be placed into the correct file in the ICTool Install base. The location of that file depends on your server name (so that you can have one per server. If you have multiple sites per server, there are substitutions to be used).
update c set descript = ‘Contracting Provisions‘ from xsfCodeList c where c.codevaluekey = ‘3DADA4B0-BE29-438B-8FB9-FDCEA3802B39‘ and descript <> ‘Contracting Provisions‘
update c set descript = ‘Specific Provisions‘ from xsfCodeList c where c.codevaluekey = ‘7462BB56-B515-432B-944D-F83A3CF322D9‘ and descript <> ‘Specific Provisions‘
Version upgrades may require additional considerations. If you want to customize an entire stored procedure, see KBA-01430.
KBA-01487; Last updated: October 27, 2016 at 12:23 pm
Keywords: backend customizations, lost customization, customization written over