Require qualys_id for risk_acceptance in bulk Atlas action plan modal
This commit is contained in:
@@ -3883,6 +3883,8 @@ function BulkAtlasModal({ selectedFindings, onClose, onSuccess }) {
|
|||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (!commitDate) { setError('Commit date is required'); return; }
|
if (!commitDate) { setError('Commit date is required'); return; }
|
||||||
if (hostIds.length === 0) { setError('No valid host IDs in selection'); return; }
|
if (hostIds.length === 0) { setError('No valid host IDs in selection'); return; }
|
||||||
|
const needsQualysId = ['remediation', 'false_positive', 'risk_acceptance'].includes(planType);
|
||||||
|
if (needsQualysId && !qualysId.trim()) { setError(`Qualys ID is required for ${planType.replace(/_/g, ' ')} plans`); return; }
|
||||||
|
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
@@ -4041,9 +4043,9 @@ function BulkAtlasModal({ selectedFindings, onClose, onSuccess }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Optional fields — shown based on plan type */}
|
{/* Optional fields — shown based on plan type */}
|
||||||
{(planType === 'remediation' || planType === 'false_positive') && (
|
{(planType === 'remediation' || planType === 'false_positive' || planType === 'risk_acceptance') && (
|
||||||
<div style={{ marginBottom: '0.75rem' }}>
|
<div style={{ marginBottom: '0.75rem' }}>
|
||||||
<label style={labelSt}>Qualys ID <span style={{ color: '#475569', textTransform: 'none' }}>(optional)</span></label>
|
<label style={labelSt}>Qualys ID <span style={{ color: '#475569', textTransform: 'none' }}>(required for {planType.replace(/_/g, ' ')})</span></label>
|
||||||
<input value={qualysId} onChange={e => setQualysId(e.target.value)}
|
<input value={qualysId} onChange={e => setQualysId(e.target.value)}
|
||||||
placeholder="QID-12345" style={inputSt} />
|
placeholder="QID-12345" style={inputSt} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user