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.
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.