Hi all, I run the below script as behavior script and it works. When trying to run the code from automation rules I get some errors:
Hi @Guy Marelly ,
I'm afraid that's normal. A behaviour and a Job/Listener (which I assume you use as an automation) work differently.
A behaviour is based on the UI/Screen and has specific methods available such as getFieldById()
These methods don't work in a standalone script so you'll have to rewrite it to actually work in the job/listener context.
I suggest checking out the adaptavist documentation first https://docs.adaptavist.com/sr4js/latest/features/jobs
TLDR; behaviours use different methods than jobs/listener so you'll have to use the right ones.
Thanks Dirk for your quick reply and explanation!
I'll check the documentation you've recommended.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.
Learn moreOnline 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.