Hi,
I have written a script in a listener which gets some properties from an issues and adds them up. The sum is stored in another field. The listener currently works on the events "Issue Created" and "Issue Updated".
The logic in the script might change at some point and I would like to then run the script on all issues within a project.
Where do I place my code so that I can use it in a listener as well as e.g. in the console or in a scheduled job? I placed a groovy file into the script editor and the file now contains a groovy class "MyClass" in a package like "my.package".
Is there any change I can access this class in a listener using in import such as "import my.package.MyClass", create an instance and run a method passing in the issue from the listener event?
Thanks,
Tobias.
Mmh. I might have made some mistake, but it seems to work now. I was able to import my class on the "Console", instantiate it and run a method on it. Sorry for the noise.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.