Hi,
I am trying to write an automation for Assets, which will run actions on Jira once an object of a specific type is created.
For this, I am using a mapping, which is defined in a JiraConstants.groovy file, so that it can be used from multiple points in the instance.
Unfortunately, this is failing in case of Assets automation with "unable to resolve class" error.
I am using the following code:
import com.my.package.JiraConstants
And this is where it is failing. I have added the location of the script to the allowed list already in the same way as the running script. As the running script is executed, I assume this is correct. However, an import of the constants class is failing, while other imports like org.slf4j.Logger are working fine.
Is there anything special to be done when using another script file in Assets automation scripts?
Thanks!
Stefan
Hi Stefan!
This is a common issue. The Asset Script runtime appears to be different from the one you use in Script console or Script editor. Therefor some classes are not available form Asset script console. I would solve this by storing these constants in Asset management somewhere, that way you will be able to access them form all script environments.
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.