ScriptRunner: How to search for issues with attachment

How is the syntax for search for issues in one project which have attachments?

Is it possible to add also the user who has attached the file in the query?


1 answer

1 accepted

Thank you very much for this very fast answer. I don't know why, but if I insert your source (and also other test syntax) I get always errors back (e.g. No such property: issueFunction for class: Script9 e.g. startup failed: Script10.groovy: 1: unexpected token: in @ line 1, column 35. project = FIASA and issueFunction in hasAttachments() ^ 1 error ). So do I have to set anywhere something? Should this run after install the plugin? I run already the Reindex after installation. Have I write something around this statement?

I thought you were asking about how to run a query? It sounds like you are using it as a condition or something. Can you attach a screenshot, and describe more what you're trying to achieve... ta.

I tried the whole time to run this scrips in the Admin Script console and not in the default search!!! This was my problem - thank you very much for your help!

you're welcome.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,865 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot