I'm working with the example LDAP search script at https://scriptrunner.adaptavist.com/latest/jira/resources.html#_ldap_connection
The line "attributes.get('cn').get()" gives a syntax error because Object doesn't have a get method. Can ScriptRunner be made aware of the type of attributes so that the syntax error doesn't occur?
Yes, the script executes fine. I just have these nasty red X's next to my code implying that something is broken.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can ignore these STC errors. Also look at this page for information related to this topic: https://scriptrunner.adaptavist.com/latest/jira/#_tips_for_type_checking
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be nice if the examples didn't have STC errors out of the box. For someone new to ScriptRunner, I rely upon the STC to tell me when I've done something that isn't going to work.
I do see that there is an "as" clause in the example. I would have thought that would give the STC enough information to know the type of "attributes".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.