I'd like to set a condition for a fast-track script based on the value of a custom field. I used to have this working in Scriptrunner (Server) but cannot find an example of how to work it using Scriptrunner (Cloud).
My successful old implementation was:
cfValues['Change Category']?.value == 'Fast Track'All research done so far indicates I need to hard code the custom field ID to be something like (?!):
issueInput.fields.customfield_10107 == [value: '{{Fast Track}}'] as Map
where 10107 is the custom field ID. Which is not ideal as I'd like to refer to the name instead.
Any ideas?
Welcome to the community.
Could you please clarify if you have tried using ScriptRunner's HAPI feature to set the value for the Assets field?
If not, I suggest looking at the Assets section in the ScriptRunner HAPI documentation. There are a couple of examples in the documentation which show how you can use HAPI to manage the assets.
I am looking forward to your feedback and clarification.
Thank you and Kind regards,
Ram
Hi Ram, thanks for replying.
Yes, I am using HAPI. What I want to do is populate an Assets custom field service desk screen (shown in my first post) with values from Assets. So the process would be:
The code in my initial post (which I took from the Behaviors Setting Field Defaults page) works fine if the Assets custom field is set to multiple select. But for me the same code does not work if the field is multiple checkbox.
Here's a step by step:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for providing the requested information.
I will review it and get back to you once I have an update.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.