Need A way to extract all groups and there usage through SQL
I'd suggest asking your admins for a more human answer.
I can think of around 30 different SQL queries that, while "accurate", won't tell you what you really need to know about access.
Instead of giving you a "Microsoft" answer (technically accurate, but completely useless), could you tell us what you are trying to do? What question are you trying to answer, and why?
Hi Nic,
I am currently an Intern and trying my hands in every Area of JIRA, I tried my hands in JIRA, EasyBI, BigPicture, so My JIRA admin gave me a assignment to figure out where all the groups are getting used in JIRA for Ex.
I want to extract the list.
I found this link but I have to insert all the roles and run separate query for for each which kind of make it complicated.
https://confluence.atlassian.com/jirakb/how-to-identify-group-usage-in-jira-441221524.html
Need some work around for this.
A manual way is to look at all your permission schemes and notifications schemes for the groups they use. Then go through all project roles and do the same. Groups can also be used for sharing of filters and dashboards. Finally check all workflows for group usage in the XML. Very tedious!
I would love to see a plugin that does all this for admins
Hello Matt I want an SQL query for that since my admins want to automate the process
Me too!
Right, that's a significant project in itself, even in a small Jira.
Your list is a start, but you also need to look at
As you can tell, this is not a simple task. However, it is generally of limited use too, and hence pretty much a massive waste of time.
Go back to the real question. "I want to know where groups/users are used" is not the real question. Why do you want to know where they're used? What's the point? Why does it matter?
The JIRA admin wants it for tracking process and she wants to automate the process instead of looking into JIRA manually
This article comes on the top of google queries for "jira find where group is used", and does sadly not contain the answer from other similar questions. So I'm therefore pointing out that there is a knowledge-base article for it: https://confluence.atlassian.com/jirakb/how-to-identify-group-usage-in-jira-441221524.html
Problem is that article doesn't reference the complexities or how to actually answer the question. That's why Google lands here - it explains it properly.
Your answer explains the complexity on the details and nuances in the question -- I wholeheartedly agree.The kb-article gave me the answer I needed, based on a very similar question to this community post, nevertheless
I usually never comment on forums but can attest that this post is worthless and I don't understand why the question is so hard. All I want to see is the all the permission schemes (and potentially others schemes like notifications) that have a reference to the group in question. Inside the JIRA admin all you see is that the group in question has no product access which is flat garbage because the users access the product every day and are on multiple permission schemes. My use case might be far less complex than ones above, but maybe simplicity is a good place to begin?
And fields, and the configuration of dashboard gadgets, and use in saved filters, and, and, and...
(COMMENT DELETED)
Hello @Rinaldi James Michael , thanks a lot for sharing your work. The scripts saved me a lot of our time.
Do these scripts cover all the aspects listed before?
Deleted my older comments. Sharing a comparatively better solution now.
SELECTDISTINCT(group_name) as "Jira Group Name",CASEWHEN TABLE1."Group" = group_name THEN 'Used'ELSE '-'END AS "Projects Roles",CASEWHEN TABLE2."Group" = group_name THEN 'Used'ELSE '-'END AS "Global Permissions",CASEWHEN TABLE3."Group(s)" = group_name THEN 'Used'ELSE '-'END AS "Custom Fields",CASEWHEN TABLE4."Group" = group_name THEN 'Used'ELSE '-'END AS "Shared Dashboards",CASEWHEN TABLE5."Group" = group_name THEN 'Used'ELSE '-'END AS "Shared Filters",CASEWHEN TABLE6."Group" = group_name THEN 'Used'ELSE '-'END AS "Filter Subscriptions",CASEWHEN TABLE7."Group" = group_name THEN 'Used'ELSE '-'END AS "Board Administrators",CASEWHEN TABLE8."Group" = group_name THEN 'Used'ELSE '-'END AS "Application Access",CASEWHEN TABLE9.groupname = group_name THEN 'Used'ELSE '-'END AS "Permission Scheme",CASEWHEN TABLE10.groupname = group_name THEN 'Used'ELSE '-'END AS "Permission Scheme Granted to Group",CASEWHEN TABLE11.actionlevel = group_name THEN 'Used'ELSE '-'END AS "Comment Visibility",CASEWHEN TABLE12.sec_parameter = group_name THEN 'Used'ELSE '-'END AS "Issue security level",CASEWHEN TABLE13.grouplevel = group_name THEN 'Used'ELSE '-'END AS "Work Log visibility",CASEWHEN TABLE14."JQL" LIKE CONCAT('%',group_name,'%') THEN 'Used'ELSE '-'END AS "Saved Filters (JQL)",CASEWHEN TABLE15."VALUE" LIKE CONCAT('%',group_name,'%') THEN 'Used'ELSE '-'END AS "Automation Rules",CASEWHEN TABLE16."Descriptor" LIKE CONCAT('%',group_name,'%') THEN 'Used'ELSE '-'END AS "Workflows"FROM cwd_group cgLEFT JOIN(SELECTDISTINCT(pra.roletypeparameter) AS "Group"FROMprojectroleactor praLEFT JOIN projectrole pr ON pra.projectroleid = pr.idLEFT JOIN project p ON pra.pid = p.idWHEREpra.roletype = 'atlassian-group-role-actor')as TABLE1 ON TABLE1."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(gp.group_id) AS "Group"FROMglobalpermissionentry gp)as TABLE2 ON TABLE2."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(cfv.stringvalue) AS "Group(s)"FROMcustomfieldvalue cfvLEFT JOIN customfield cf ON cf.id = cfv.customfieldLEFT JOIN jiraissue ji ON cfv.issue = ji.idLEFT JOIN project p ON ji.project = p.idWHEREcf.customfieldtypekey IN ('com.atlassian.jira.plugin.system.customfieldtypes:grouppicker','com.atlassian.jira.plugin.system.customfieldtypes:multigrouppicker'))as TABLE3 ON TABLE3."Group(s)" = cg.group_nameLEFT JOIN(SELECTDISTINCT(shp.param1) AS "Group"FROMsharepermissions shpLEFT JOIN portalpage pp ON shp.entityid = pp.idWHEREshp.entitytype = 'PortalPage'AND shp.sharetype = 'group')as TABLE4 ON TABLE4."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(shp.param1) AS "Group"FROMsharepermissions shpLEFT JOIN searchrequest sr ON shp.entityid = sr.idWHEREshp.entitytype = 'SearchRequest'AND shp.sharetype = 'group')as TABLE5 ON TABLE5."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(fs.groupname) AS "Group"FROMfiltersubscription fsLEFT JOIN searchrequest sr ON fs.filter_i_d = sr.id)AS TABLE6 ON TABLE6."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(ba."KEY") AS "Group"FROM"AO_60DB71_BOARDADMINS" baLEFT JOIN "AO_60DB71_RAPIDVIEW" rv ON ba."RAPID_VIEW_ID" = rv."ID"WHEREba."TYPE" = 'GROUP')AS TABLE7 ON TABLE7."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(group_id) AS "Group"FROMlicenserolesgroup)AS TABLE8 ON TABLE8."Group" = cg.group_nameLEFT JOIN(SELECTDISTINCT(SP.perm_parameter) AS GroupNameFROMschemepermissions SPINNER JOINpermissionscheme PS ON SP.scheme = PS.idWHERESP.perm_type = 'group')AS TABLE9 ON TABLE9.groupname = cg.group_nameLEFT JOIN(SELECTDISTINCT(SP.perm_parameter) AS GroupNameFROMschemepermissions SPINNER JOINpermissionscheme PS ON SP.scheme = PS.idWHERESP.perm_type = 'group')AS TABLE10 ON TABLE10.groupname = cg.group_nameLEFT JOIN(select DISTINCT(ja.actionlevel)from jiraaction ja)AS TABLE11 ON TABLE11.actionlevel = cg.group_nameLEFT JOIN(select DISTINCT(sec_parameter)from schemeissuesecurities siswhere sis.sec_type = 'group')AS TABLE12 ON TABLE12.sec_parameter = cg.group_nameLEFT JOIN(select DISTINCT(wl.grouplevel)from worklog wl) AS TABLE13 ON TABLE13.grouplevel = cg.group_nameLEFT JOIN(SELECTDISTINCT(reqcontent) AS "JQL"FROMsearchrequest) AS TABLE14 ON TABLE14."JQL" LIKE CONCAT('%',cg.group_name,'%')LEFT JOIN(select "VALUE" from "AO_589059_RULE_CFG_COMPONENT") AS TABLE15 ON TABLE15."VALUE" LIKE CONCAT('%',cg.group_name,'%')LEFT JOIN(SELECTjw.descriptor AS "Descriptor"FROMjiraworkflows jw) AS TABLE16 ON TABLE16."Descriptor" LIKE CONCAT('%',cg.group_name,'%')
It looks like you're new here. Sign in or register to get started.