You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?