Can I have a report where i can see information of all users which contain user properties?
I found this post: https://community.atlassian.com/t5/Answers-Developer-Questions/Can-I-report-based-on-user-properties/qaq-p/545768
But this groovy code for ScriptRunner, but is not working on Jira Cloud
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.util.UserUtil
UserUtil userUtil = ComponentAccessor.getUserUtil()
def result = ""
// Get details for each user
userUtil.getUsers().findAll{it.isActive()}.each{ u ->
result += u.name + "," + u.displayName + "," + u.emailAddress + "," + u.properties + "<br/>"
}
// Use these three lines for all users rather than all active users
//userUtil.getUsers().findAll().each{ u ->
// result += u.name + "," + u.displayName + "," + u.emailAddress + "," + u.properties + "<br/>"
//}
// Return the results out to the script console in a comma seperated format which can be taken and pasted into another tool such as excel
def header ="Username" +"," + "Full Name" +"," + "Email" +"," + "User Properties Array"
def formatteresult = header +"<br/>" + result
return formatteresult
Here is error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 9: expecting '}', found '-' @ line 9, column 52.
indAll{it.isActive()}.each{ u ->
Thanks in advance