Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Error with calling plugin in scriptrunner

Why am I getting this error?

-------------------------------------------------------------------------------------------------

General error during conversion: Requested plugin com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManager was not installed/enabled-

--------------------------------------------------------------------------------------------------

Below is a snippet of my script in calling the plugin:

import com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManage


@WithPlugin("com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManager")

@PluginModule

TGEGridTableDataManager tgeGridDataManager

 

tgeGridDataManager = ComponentAccessor.getOSGiComponentInstanceOfType(TGEGridTableDataManager.class);
def rows = tgeGridDataManager.readGridData(issue.getId(), tgeCustomFieldId, null, null, 0, 100, user);

 

 

What should I do to call the TGE plugin in my script?

1 answer

Hi,

Could you try to replace this line?

@WithPlugin("com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManager")

and use this line instead:

@WithPlugin("com.idalko.jira.plugins.igrid")


Don't hesitate to share with us the results,
Regards

or use

PluginAccessor pluginAccessor = ComponentAccessor.getPluginAccessor()
Class dataManagerClass = pluginAccessor.getClassLoader().findClass("com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManager")
def tgeGridDataManager = ComponentAccessor.getOSGiComponentInstanceOfType(dataManagerClass);

Hello,

According to ScriptRunner, they have updated their way of calling plugin resources by using @WithPlugin and @PluginModule.

I have used what you suggested:

PluginAccessor pluginAccessor = ComponentAccessor.getPluginAccessor()
Class dataManagerClass = pluginAccessor.getClassLoader().findClass("com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManager")
def tgeGridDataManager = ComponentAccessor.getOSGiComponentInstanceOfType(dataManagerClass);

but I am  getting errors with this.

and when I used:

@WithPlugin("com.idalko.jira.plugins.igrid")

there are no more errors. However, my script is still returning an empty grid data, I think the plugin is still not being recognized :( 

Will my script still work correctly even if it has static type checking errors?

Because I returned my script to its original script using this: https://docs.idalko.com/tgng/pages/viewpage.action?pageId=26183994

i just edited the value of the custom field and the values in the checking of row values. I get static type checking errors, but it is still allowing me to run the script. And then I tried testing it, however I'm getting this error:

"It seems that you have tried to perform an illegal workflow operation.

If you think this message is wrong, please contact your JIRA administrators."

 

What do you think is the problem why my script is not working? :(

Thank you!

I'm sure that I put the correct values in  the script, but I still get static type checking errors and my scriptrunner validator is still not working :(

Suggest an answer

Log in or Sign up to answer
TAGS

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