Hi,
I have the following Scriptrunner Script that used to remove applications links from jira:
import com.atlassian.jira.component.ComponentAccessorimport com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPluginimport com.atlassian.applinks.api.ApplicationLinkService
import com.atlassian.applinks.spi.link.ApplicationLinkDetails
ApplicationLinkService applicationLinkService = ComponentAccessor.getComponent(ApplicationLinkService)
@WithPlugin('com.atlassian.applinks.applinks-plugin')
import com.atlassian.applinks.core.DefaultApplicationLinkService
@PluginModuleDefaultApplicationLinkService defaultApplicationLinkService
applicationLinkService.getApplicationLinks().each{ defaultApplicationLinkService.deleteApplicationLink(it)}
It worked in jira 8.5 but stopped working in jira 8.13, in 8.13 I get error
java.lang.Exception: Can't find plugin module or OSGi service for class: com.atlassian.applinks.core.DefaultApplicationLinkService, check the plugin is installed / enabled / licensed. at com.onresolve.scriptrunner.runner.ScriptRunnerImpl.getPluginComponent(ScriptRunnerImpl.groovy:94) at com.onresolve.scriptrunner.runner.ScriptRunnerImpl$getPluginComponent$2.callStatic(Unknown Source) at Script168.run(Script168.groovy:13)
Adaptavist support only mentioned that com.atlassian.applinks.applinks-plugin have less modules (94 instead of 127) but I have jira code downloaded and DefaultApplicationLinkService is still under:
com.atlassian.applinks.core.DefaultApplicationLinkService in applinks-plugin-8.0.0-sources.jar file.
What more, Code Completions in scriptrunner works and I can see and pick methods from DefaultApplicationLinkService .
also I've try with other class in this jar:
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.applinks.api.ApplicationLinkService
import com.atlassian.applinks.spi.link.ApplicationLinkDetails
ApplicationLinkService applicationLinkService = ComponentAccessor.getComponent(ApplicationLinkService)
@WithPlugin('com.atlassian.applinks.applinks-plugin')
//import com.atlassian.applinks.core.DefaultApplicationLinkService
import com.atlassian.applinks.core.ApplinkStatusService
@PluginModule
//DefaultApplicationLinkService defaultApplicationLinkService
ApplinkStatusService applinkStatusService
applicationLinkService.getApplicationLinks().each{
log.error applinkStatusService.getApplinkStatus(it.getId())
// defaultApplicationLinkService.deleteApplicationLink(it)
}
and this worked, what is the difference between DefaultApplicationLinkService and ApplinkStatusService? location is almost the same:

Any idea why this import stopped working and how properly import DefaultApplicationLinkService?
Best Regards,
Lukasz