diff --git a/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx b/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx index 2f1699523e0f..034ff4f939a5 100644 --- a/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx +++ b/opencti-platform/opencti-front/src/private/components/observations/stix_cyber_observables/StixCyberObservableCreation.jsx @@ -930,6 +930,29 @@ const StixCyberObservableCreation = ({ /> ); } + if ( + attribute.value === 'name' + && status.type === 'Autonomous-System' + ) { + const setDefaultAutonomousSystemId = (_, value) => { + const match = value.match(/^as(\d+)$/i); + if (match && !values.number) { + setFieldValue('number', parseInt(match[1], 10)); + } + }; + return ( + + ); + } return (