I am trying to figure out what I think is a simple issue. I am trying to create a restAPI using scriptrunner, and simply dump the data from a JQL. I almost have it working I believe...
However, this returns a blank page...
def jql= "project = Project1"
def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser)
def searchService = ComponentAccessor.getComponent(SearchService)
def searchProvider = ComponentAccessor.getComponent(SearchProvider.class)
def query = jqlQueryParser.parseQuery(jql)
def results = searchService.search(user,query, PagerFilter.getUnlimitedFilter())
helpdeskActiveAgent(httpMethod: "GET", groups: ["Scriptrunner Access Group"]) { MultivaluedMap queryParams, String body ->
return Response.ok(
results.results
).build();
}
However, instead of using results.results or results.getResults(), and I use results.total, I get a valid answer [314]. However when trying to figure the JQL results, I get null.
Ultimately just trying to learn. Any help appreciated!
@Alejandro Suárez García
Thanks for the response,
I need the script for the postfunction for adding two date fields so i can add the sum in the second date field.
THEN i need to add a number field to date field ( TARGET REQUIREMENT)
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.