How to restrict .bmp, .exe, .bat, jam.dev, etc attachment types while uploading for an issue in JIRA
Hi @Rahul ,
In native jira, there is NO option to restrict files based on types. There is already a feature request with Atlassian and it is in "Under consideration" status. You can watch and vote for this ticket: https://jira.atlassian.com/browse/JRACLOUD-61024
They have also mentioned the workaround in same ticket. Check if it works for you.
If you have script runner plugin, there is simple scripted validator which can do the task for a extend.
https://docs.adaptavist.com/sr4js/latest/features/workflows/validators/validating-attachments-links-in-transitions#blocking-files-by-extension
Hi @Rahul
It is not possible in Jira out-of-the-box. All you can do is validate the attachment properties during the transition. This can be the create transition or any other transition. It won't stop the user from uploading the attachment; however, it will block the creation of the issue or further transition until the attachment is removed.
You need a Jira expression-based validator provided by any app from the marketplace.
I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira app. The expression you need is as follows:
issue.attachments.every(item => !item.filename.match('(bmp|exe|bat|jam.dev)$'))
I am leaving a link to the app's documentation if you are interested.
I hope it will help.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.