On this page
Use case
Evaluate if the type of files in the Attachments field is the one specified.
This use case is valid for both conditions and validators . The only difference is that you can specify an additional error message when using a validator.
Configuration
Jira expression*
issue?.attachments.every(attachment => attachment.mimeType == "image/jpeg")
All of the attachments of the current issue must be in JPEG format.
If you need to evaluate if the type of files are in other format replace image/jpeg with the following expressions:
application/pdf for PDF files,
- image/png for PNG files,
- video/mp4 for MP4 files and
- binary/octet-stream for log files.
Related use cases
Use case JWT feature Workflow function Parser functions Label Block a transition if the type of the attached files is incorrect Evaluate custom fields Evaluate the user Make a field required only for stories Make values required in a Select List (cascading) field
If you still have questions, feel free to refer to our support team.