Community moderators have prevented the ability to post new answers.
At a high level you can report of all users details stored in the JIRA User managment screen along with some extra properties for the user using a script similar to below which was adapted from the article here.
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
If you need further details for users please let me know.
I hope this helps.
Thanks
Kristian
Hi @Kristian Walker (Adaptavist)
Where I should use this code?
I want to get the user property in a gadgets is it feasible?
Awaiting your help.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rita,
This code would need to be placed ran in the script console which can be accessed under Add Ons > Script Console as shown below.
image2016-2-18 14:1:20.png
This cannot be placed in a dashboard gadget as Script Runner does not currently provide any dashboard gadgets. I you could raise a new feature request for this at https://productsupport.adaptavist.com/servicedesk/customer/portal/2 then we may be able to look to implement this feature in future releases.
Their may be some plugins on the Atlassian marketplace which may help but I do not of any to recommend of the top of my head.
Thanks
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kristian Walker (Adaptavist), this is the data that I get on accessing the properties field of user, unlike what I thought it would be -->
[active:true, class:class com.atlassian.jira.user.DelegatingApplicationUser, id:10200, key:jiraapiuser, directoryId:10000, directoryUser:JiraAPIUser:10000, emailAddress:jiraapiuat@xxxx.xxx, username:JiraAPIUser, name:JiraAPIUser, displayName:JiraAPIUser]
The properties added to the user, like key and value is no where to be seen.
Hope this clears my query. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rita,
Could I please clarify what you mean by user properties and what information you would like to report?
Thanks
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kristian Walker (Adaptavist) do you have any idea concerning this issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.