Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

LDAP Connection script on Script Runner Resources

Dino Carreon
February 29, 2020

I was able to successfully setup the ldap connection but when I tried to run the sample script:

import com.onresolve.scriptrunner.ldap.LdapUtil

def cnList = LdapUtil.withTemplate('corporate') {

template -> template.search("", "(sn=Smi*)", SearchControls.SUBTREE_SCOPE, { attributes ->

          attributes.get('cn').get() } as AttributesMapper<String>)

}

I'm getting the error: Unable to resolve class AttributesMapper

 

Jira version 8.5.1

Script Runner version: 5.7.0.1-p5

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Sebastian Krzewiński
Community Champion
September 28, 2019

Hi @Jai_Nirwan 

 

I have simillar case like you. Make sure that:

- you choose correct workflow in Guide workflow

- you put your code in server-side script in customfield_10500 section.

 

IMHO I will change your code a little bit and move first condition and use built-in conditions in Behaviours. Take a look on my configurartion:

behav_config.png

 

Let me know if this help you :)

 

Regards,

Seba

TAGS
AUG Leaders

Atlassian Community Events