stable

Clone or download

Read-only

Fix request #32637 Mandatory file field is not well handled in artifact modal

Given an attachment field that is set as mandatory, and given an artifact that have a file attached in the field, then the modal must not prevent the edition of the artifact (as done in the artifact UI) if the file is not removed. How to test ----------- * Have an artifact with a required file field * Attach one file to this artifact * Open this artifact with the modal through the AD backlog page * Edit this artifact without adding a new file => The update must be approved. * Have an artifact with a required file field * Attach two files to this artifact * Open this artifact with the modal through the AD backlog page * Mark as removed one file and submit => The update must be approved. * Have an artifact with a required file field * Attach one file to this artifact * Open this artifact with the modal through the AD backlog page * Mark as removed this file and submit => The update must not be submitted. * Have an artifact with a required file field * No file must be attached to this artifact * Open this artifact with the modal through the AD backlog page * Edit content without adding a file => The update must not be submitted. * Have an artifact with a non required file field * No file must be attached to this artifact * Open this artifact with the modal through the AD backlog page * Edit content without adding a file => The update must not be approved. Change-Id: I8e3734dee2cc91ae81c0417d134ad241026303e8

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/file-field/FileField.test.ts +59 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/file-field/FileField.ts +13 −1 Go to diff View file