Hi, I was wondering if someone could assist with the conversion of this simplified directory code? That is, I'd like to convert the usage of 'findAllDirectories' it to use the new non-deprecated call, i.e., searchDirectories(EntityQuery) instead.
import com.atlassian.crowd.manager.directory.DirectoryManager
def directoryManager = ComponentAccessor.getComponent(DirectoryManager)
return directoryManager.findAllDirectories().find {
it.name.toString().toLowerCase() == 'jira internal directory'
}?.getId() ?: -1
I know I need to use com.atlassian.crowd.search.query.entity.DirectoryQuery and a replacement call like "List<Directory> ld = directoryManager.searchDirectories( XXX )" but I can't figure it out?
Any help greatly appreciated!
Garry