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?
Hi @Jon Schewe
Did the script work in your instance?
Ravi
Yes, the script executes fine. I just have these nasty red X's next to my code implying that something is broken.
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
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".
It looks like you're new here. Sign in or register to get started.