Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Dynamic class loading from apps API


Good day,

I try to prepare groovy script to realize logic before export with Better Excel Exporter.

I need to read value from project custom field (projectrak/profields app) and with scriptrunner I make it this way

import com.deiser.jira.profields.api.field.FieldService
import com.deiser.jira.profields.api.field.list.ListField
import com.deiser.jira.profields.api.value.ValueService


def valueService = ComponentAccessor.getOSGiComponentInstanceOfType(ValueService.class)
def fieldService = ComponentAccessor.getOSGiComponentInstanceOfType(FieldService.class)

ListField field = fieldService.get("Included in the week reports").get(0)
def fieldValue = valueService.getValue(project, field)

But groovy in Better Excel Exporter dont have this features of scriptrunner and I try to make it with dynamic class loading this way

in class constructor I make loading of classes

valueService=ComponentAccessor.getOSGiComponentInstanceOfType(valueServiceClass) fieldService=ComponentAccessor.getOSGiComponentInstanceOfType(fieldServiceClass) listField=ComponentAccessor.getOSGiComponentInstanceOfType(listFieldClass)

But with log I see that listFieldClass= interface com.deiser.jira.profields.api.field.list.ListField

and listField=null (looks that is not right)
and then in function I want to make read of field value like this

def field = this.listField.newInstance()
field = this.fieldService.get("Included in the week reports").get(0)
def fieldValue = this.valueService.getValue(project, field)

But script doesn't go through line with def field = this.listField.newInstance()


In logs I don't see exact groovy error message, only messages of fail render from Better Excel Export app. And I don't have experience yet with dynamic class loading so maybe I just failed with code logic


1 answer

Hi @Alexander Raymukanov ,

I'm Fede Baronti from DEISER. Thanks for submitting your question in the community. 

Since you've also reported a support request we'll communicate with you through that channel. 

Thanks again and best regards,


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

51 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you