Hi
I´m using a script in post-function to set a value to a customfield ( "Set Field Value Post Function - JMWE app .9.1.0 and Jira DataCenter v.9.12.7
No error occours at Script Runner Console, but running the transaction, I have this message error : "Cannot invoke method newInfoQueryBuilder() on null object" to this code:
Note : This works with Jira 8.
Note2: "SlaInformationService srv = ComponentAccessor.getOSGiComponentInstanceOfType(SlaInformationService)" also worked with Jira 8 but now it says that "Unable to resolve component: interface com.atlassian.servicedesk.api.sla.info.SlaInformationService" BUT not in ScriptRunner Console.
Bug in JMWE ???
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.servicedesk.api.sla.info.SlaInformationService
import com.atlassian.servicedesk.api.sla.info.SlaInformationQuery
import com.atlassian.servicedesk.api.util.paging.PagedResponse
import com.atlassian.servicedesk.api.sla.info.SlaInformation
import com.atlassian.jira.bc.issue.search.SearchService
import com.atlassian.jira.web.bean.PagerFilter
import com.atlassian.servicedesk.api.util.paging.SimplePagedRequest
import com.atlassian.servicedesk.api.util.paging.PagedRequest
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.onresolve.scriptrunner.runner.customisers.PluginModule
@WithPlugin("com.atlassian.servicedesk")
@PluginModule SlaInformationService srv
//SlaInformationService srv = ComponentAccessor.getOSGiComponentInstanceOfType(SlaInformationService)
long idDummy = 1399021//issue.id
PagedRequest pagedRequest
SlaInformationQuery slaQuery
def slaInfo
PagedResponse pagedResponse
SlaInformation[] SLAs = null
pagedRequest = new SimplePagedRequest( 0, 5 )
slaQuery = srv.newInfoQueryBuilder().issue( idDummy ).pagedRequest( pagedRequest ).build()
Hi @Kleber Fonseca,
The JMWE 9.1.1 version includes a bug fix for the 'Set Issue Fields' post function. Do you have this error in the latest version of JMWE?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.