The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ScriptRunner: How to search for issues with attachment

Juliane Di Lascio
Contributor
May 27, 2015

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 28, 2015
Juliane Di Lascio
Contributor
May 28, 2015

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?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 28, 2015

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.

Juliane Di Lascio
Contributor
May 28, 2015

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!

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 28, 2015

you're welcome.