Onprem import: Default values on sam_sw_product_lifecycle table were not set for source, lifecycle_type, risk and active fieldsDescriptionOnprem import: Default values on sam_sw_product_lifecycle table were not set for source, lifecycle_type, risk and active fieldsSteps to Reproduce 1. Have a local or TD instance with samp plugins2. Enable "Manage software library" module3. Import content zip file4. Observe default values on sam_sw_product_lifecycleWorkaroundRun below script as a scheduled job in non-business hours as it can take couple of hours to completeScript://----------------------------------------------------------------------------------------------------------updateDefaults();function updateDefaults() {updateLifecycle();updateContentVer();updateUWR('samp_sw_publisher');updateUWR('samp_sw_product');}function updateLifecycle() {gs.log('Update of sam_sw_product_lifecycle started');var lifecycles = new GlideRecord('sam_sw_product_lifecycle');lifecycles.addNotNullQuery('content_version');lifecycles.addNullQuery('source');lifecycles.query();while (lifecycles.next()) {lifecycles.setValue('source', 'service_now');lifecycles.setValue('lifecycle_type', 'publisher');lifecycles.setValue('risk', new SamLifeCycleUtils().getDefaultRisk(lifecycles.getRecordClassName(), lifecycles.getValue('lifecycle_phase')));lifecycles.setValue('active', (lifecycles.getValue('content_active') === 'true'));lifecycles.setWorkflow(false);lifecycles.update();}gs.log('Update of sam_sw_product_lifecycle finished');}function updateContentVer() {gs.log('Update of samp_content_version started');var contentVers = new GlideRecord('samp_content_version');contentVers.setValue('active', true);contentVers.setWorkflow(false);contentVers.updateMultiple();gs.log('Update of samp_content_version finished');}function updateUWR(table) {gs.log('Update of ' + table +' started');var uwr = new GlideRecord(table);uwr.addNullQuery('use_when_reporting');uwr.setValue('use_when_reporting', false);uwr.setWorkflow(false);uwr.updateMultiple();gs.log('Update of ' + table +' finished');}//----------------------------------------------------------------------------------------------------------Related Problem: PRB1705952