Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner Behaviour doesnt work normally

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2019

I have written a custom behaviour and this thing is just getting annoying by not working correctly.

The use of it is : For populating a custom field (single list) with mapped options(Locations) which are predefined inside the script in a Map<Account,List<Location>>. These options will be shown in the List only when the right Account is chosen!

So this script is tested in my test env. and everything was running as it should, without any issues (80% of the time). The issue here is that i am receiving the same error every time and its something that i dont know how to co-op. These errors are received also in test env.

Script1.groovy: 17: unable to resolve class com.tempoplugin.accounts.account.api.Account
@ line 17, column 1.
import com.tempoplugin.accounts.account.api.Account
^

Script1.groovy: 18: unable to resolve class com.tempoplugin.accounts.account.impl.AccountServiceImpl
@ line 18, column 1.
import com.tempoplugin.accounts.account.impl.AccountServiceImpl
^

2 errors

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 17: unable to resolve class com.tempoplugin.accounts.account.api.Account
@ line 17, column 1.
import com.tempoplugin.accounts.account.api.Account
^

Script1.groovy: 18: unable to resolve class com.tempoplugin.accounts.account.impl.AccountServiceImpl
@ line 18, column 1.
import com.tempoplugin.accounts.account.impl.AccountServiceImpl
^

 Just to tell you that i have the Tempo Account plugin installed and working properly.

Is there something that maybe i am missing?

Thanks in advance

CM

 

1 answer

0 votes
Marc Minten (EVS)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2019

Did you use the "@WithPlugin()" annotation ?

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2019

Yes... Here is a snap also!

2019-05-06 15_54_12-Behaviours - AM Jira.png

Marc Minten (EVS)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2019

I think it should be

@WithPlugin("is.origo.jira.tempo-plugin")

see https://scriptrunner.adaptavist.com/latest/jira/plugins/working-with-tempo.html

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2019

I could give it a try! But this annotation corresponds to Tempo Timesheets plugin APP key as i see! 

Should i also use this ? @PluginModule("Account") ?

Marc Minten (EVS)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2019

see the link (scriptrunner doc) !

Do NOT add the @PluginModule("Account") 

Like Christos Moysiadis likes this
Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2019

Unfortunatelly , it does not work properly again. even after the changes.

Any other thought?

Marc Minten (EVS)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2019

...depends what is "...does not work properly..." :-)

Please be somewhat more precise when you raise questions!

Christos Moysiadis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2019

"...does not work properly..." means that i am receiving the same errors as before! 

If you have any more thoughts about this issue , feel free to post them. In any case though, thank you very much for your time!

Suggest an answer

Log in or Sign up to answer