Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,183
Community Members
 
Community Events
168
Community Groups

trouble with cqlSearchUtils.searchForContent() in scriptrunner script.

Having issues with the - cqlSearchUtils.searchForContent()

Tying to execute the following code in the Scriptrunner Console.

import com.onresolve.scriptrunner.canned.confluence.utils.CQLSearchUtils
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl

def cqlSearchUtils = ScriptRunnerImpl.scriptRunner.getBean(CQLSearchUtils)
def cqlQuery = 'space = AP' // some CQL query
def pages = cqlSearchUtils.searchForContent(cqlQuery)

Getting following error:

Error:
groovy.lang.MissingMethodException: No signature of method: com.onresolve.scriptrunner.canned.confluence.utils.CQLSearchUtils.searchForContent() is applicable for argument types: (String) values: [space = AP]
at Script96.run(Script96.groovy:8)

 

Any suggestions or alternatives?

 

Thanks.

KC

2 answers

1 accepted

Hi Karunakar,

I've added an example here that displays how you can perform a simple CQL search with ScriptRunner. 

Please let me know if this works for you! 

Kind regards, 
Lee

Tying to execute the following code in the Scriptrunner Console.

import com.onresolve.scriptrunner.canned.confluence.utils.CQLSearchUtils
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events