The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
How to write the Jira Expression that attachment is not null
Hi @Sunilkumar k ,
With Jira Expressions, the attachment attribute is never null – it's always a list.
Now, if you want to check if there's an attachment to your issue, here's how to do that:
issue.attachments.length > 0
Above expression will be false unless an attachment has been added to the issue.
Hope that helps,
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sunilkumar k ,
You can use the following JQL:
Search for issues that have attachments:attachments IS NOT EMPTY
Search for issues that do not have attachments:attachments IS EMPTY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rob Horan
It is throwing me a error i need jira expression to write in the custom validator that allow if attachment is some type or allow if attachment is null,
i am able to allow only excel attachments but i need to write the expression to allow if the attachment is null, an you please help me on this please
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.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.