Script runner: JQL function gets error: This type not implemented in this release. A stacktrace has been logged.

Jira 5.2.6#849-sha1:560c048

Script runner: 2.1.15

I have been trying to translate the RoleMember.java JQL function from the SDK tutorial (https://developer.atlassian.com/display/JIRADEV/JQL+Function+Plugin+Module) into a JQL function groovy script.

The validation part went OK, but when I tried to implement the method getValues I got the error message:

This type not implemented in this release. A stacktrace has been logged.

I stripped the getValues method down to:

List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause) {
    def literals = []
    literals
}

and I still got the "This type not implemented..." error message.

I only have access to this Jira instance using the web interface (admin web interface), so I am pasting in the groovy code into the inline box, not using a path to a file.

I do not have access to the logs, so I have no way of inspecting the stack trace.

I tried pasting in the source of the MyProjects groovy script into the inline text box, instead of my own code, and I still got the "This type not implemented..." error message.

I have found no relevant google matches when searching for:

This type not implemented in this release. A stacktrace has been logged.

(or even parts of it. Lots of stop words in there, and very few distinctive index matches. Using a phrase search turned up nothing. Adding "JIRA" and/or "Script Runner" to the mix found nothing useful).

Does anyone know what is happening here? Is there a problem with inline scripts? With inline JQL function scripts? With the script runner and the current version of JIRA?

Thanks!

- Steinar

2 answers

1 accepted

0 votes
Accepted answer

I had set the return type to "Any", since what I wanted was User but not one of the other alternatives ("IssueFunction", "Project", "Version", "Component", "ProjectCategory", "Issue").

Switching the return type to something other than "Any", still with the pasted MyProjects script in the inline, gave various returned values (a collection of two items interpreted variously).

Could the message come from the return type "Any" not being supported for getValues returns?

If so, I guess I will have to reformulate the JQL function to return one of the allowed types. What I actually wanted this function for, was to create a query for issues reported by users that have a particular role in a particular project. So I will try changing the function from hasRole to issuesReportedByRole.

Finding all issues reported by a particular user doesn't seem to be easy in the API, except by iterating over all issues and checking for the reporter. This was one of the reason I tried to go the hasRole way in the first place. I had hoped to be able to do something like this in JQL:

reporter in hasRole("Somerole")

Is there a way to query the API for all issues reported by a particular user, that doesn't involve iterating over all issues?

Thanks!

- Steinar

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,721 views 17 21
Read article

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