Yes that's possible.
You can either use the form-base configuration in behavior and select those fields.
Or if you want to access them via scripts, you'll use the getFieldById() method.
There are different ways to identify the field id. I personally like to just examine the page html using the browser developer tools. Open the form with the field you want to hide, right-click on the field and select inspect.
For example, doing that on the fix version, you will see something like this:
I have highlighted where I found the field ID.
You can also use the form-base configuration, add the field and save, then examine the behaviour rest output:
It will show you the fields you selected and their ids
Hey @Peter-Dave Sheehan ,It worked (Inspect thing) for all other fields correctly & guess where it didn't work, fixVersions field is not getting hidden with it, I tried to hide with both methods getFieldByID() & getFieldByName() but no success, anything that you could think off ?
Probably a difference in jira version or version field display configuration difference.
In behaviours, add the fixVersion Field and save your behaviour.
Look at the URL
Now, change the plugins/sevlet/scriptrunner/admin/behaviours/edit part of the URL with wih rest/scriptrunner/behaviour/latest/config
This will show you exactly what your field ID is.
If your script still doesn't work with that id, you'll have to share your full script for debugging.
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events