Hi everyone!
For eazyBI for Jira Cloud users with Organization or Product admin rights in your Jira instance.
If you ever wonder if you are using all of the Issue Types and Issue Type schemes in your Jira and would like to find the unused ones, here’s a rather simple solution that will result in dashboards like this:
Disclaimer: In instances with a large number of Projects and Issue Types, this REST API call may time out. Let me know if you experience this, and I’ll simplify the request to see at least a partial set of data.
To import the data and create the dashboards, you can do the following steps:
Step 1:
Create a new account in your eazyBI instance.
Step 2:
In the Source Data tab click “Add new source application” and choose “Import definition”.
Step 3:
Use the following source definition and replace “ecosystem.atlassian.net” with the URL of your instance.
{
"application_type": "rest_api",
"application_params": {
"source_params": {
"url": "https://eazybi-support.atlassian.net/rest/api/3/issuetypescheme?expand=issueTypes,projects",
"request_method": "get",
"pagination": "offset_limit",
"page_parameter": "page",
"page_parameter_in_body": null,
"offset_parameter": "startAt",
"offset_parameter_in_body": null,
"limit_parameter": "total",
"limit_parameter_in_body": null,
"limit_value": 50,
"concurrency": 10,
"incremental": null,
"incremental_stop_import": null,
"authentication_type": "basic",
"username": "email",
"content_type": "json",
"json_data_path": "$.values",
"custom_javascript_code": "var projects = doc.projects.values;\nvar issueTypes = doc.issueTypes.values;\nvar result = [];\n\nif (projects.length > 0) {\n projects.forEach(function(project) {\n issueTypes.forEach(function(issueType) {\n result.push({\n schemeId: doc.id,\n schemeName: doc.name,\n schemeDescription: doc.description,\n schemeDefault: doc.isDefault ? \"Default\" : \"Not Default\",\n projectId: project.id,\n projectKey: project.key,\n projectName: project.name,\n projectType: project.simplified ? \"Team-managed\" : \"Company managed\",\n projectIconUrl: project.avatarUrls[\"16x16\"],\n issueTypeId: issueType.id,\n issueTypeDescription: issueType.description,\n issueTypeName: issueType.name,\n issueTypeSubtask: issueType.subtask ? \"Sub-task\" : \"Standard\",\n issueTypeIconUrl: issueType.iconUrl.replace(/avatar\\/0$/, 'avatar/10300'),\n issuesCreated: getDocument( \"/rest/api/3/search?jql=project=\" + project.key + \"%20AND%20issuetype='\" + issueType.name + \"'&fields=none&maxResults=0\", {ignoreErrors: [404]}).total\n });\n });\n });\n} else {\n issueTypes.forEach(function(issueType) {\n result.push({\n schemeId: doc.id,\n schemeName: doc.name,\n schemeDescription: doc.description,\n schemeDefault: doc.isDefault ? \"Default\" : \"Not Default\",\n issueTypeId: issueType.id,\n issueTypeDescription: issueType.description,\n issueTypeName: issueType.name,\n issueTypeSubtask: issueType.subtask ? \"Sub-task\" : \"Standard\",\n issueTypeIconUrl: issueType.iconUrl\n });\n });\n}\n\nreturn result;\n"
},
"extra_options": {
"regular_import_frequency": 0,
"regular_import_at": "",
"time_zone": "Helsinki"
}
},
"source_cube_name": "Issue Type management",
"columns": [
{
"name": "schemeId",
"data_type": "integer",
"dimension": "Issue Type Scheme",
"dimension_level": "Issue Type Scheme",
"id_column": true
},
{
"name": "schemeName",
"data_type": "string",
"dimension": "Issue Type Scheme",
"dimension_level": "Issue Type Scheme",
"name_column": true
},
{
"name": "schemeDescription",
"data_type": "string",
"dimension": "Issue Type Scheme",
"dimension_level": "Issue Type Scheme",
"property": "Description"
},
{
"name": "schemeDefault",
"data_type": "string",
"dimension": "Issue Type Scheme",
"dimension_level": "Issue Type Scheme",
"property": "IsDefault"
},
{
"name": "issueTypeId",
"data_type": "integer",
"dimension": "Issue Type",
"dimension_level": "Issue Type",
"id_column": true
},
{
"name": "issueTypeName",
"data_type": "string",
"dimension": "Issue Type",
"dimension_level": "Issue Type",
"name_column": true
},
{
"name": "issueTypeDescription",
"data_type": "string",
"dimension": "Issue Type",
"dimension_level": "Issue Type",
"property": "Description"
},
{
"name": "issueTypeSubtask",
"data_type": "string",
"dimension": "Issue Type",
"dimension_level": "Issue Type",
"property": "Standard or Sub-task"
},
{
"name": "issueTypeIconUrl",
"data_type": "string",
"dimension": "Issue Type",
"dimension_level": "Issue Type",
"property": "Icon URL"
},
{
"name": "projectId",
"data_type": "integer",
"dimension": "Project",
"dimension_level": "Project",
"id_column": true
},
{
"name": "projectKey",
"data_type": "string",
"dimension": "Project",
"dimension_level": "Project",
"key_column": true
},
{
"name": "projectName",
"data_type": "string",
"dimension": "Project",
"dimension_level": "Project",
"name_column": true
},
{
"name": "projectType",
"data_type": "string",
"dimension": "Project",
"dimension_level": "Project",
"property": "Type"
},
{
"name": "projectIconUrl",
"data_type": "string",
"dimension": "Project",
"dimension_level": "Project",
"property": "Icon URL"
},
{
"name": "Row count",
"dimension": "Measures",
"dimension_member": "Row count",
"data_type": "integer",
"source_column_name": "(internal)",
"calculation": "row_count"
},
{
"name": "issuesCreated",
"data_type": "integer",
"dimension": "Measures",
"dimension_member": "Issues created"
}
]
}
Step 4:
In the “Authentication parameters” section, choose “Username & password” and provide your email as Username and your Atlassian API token as password.
Step 5:
Click “Continue”, wait for the data to be loaded in the data mapping and click “Start import”.
Step 6:
After the import finishes, go to the Dashboards tab and click the three dot button “…” → “Import definition” and import the following definition:
{
"dashboards": [ {
"name": "Issue Type management",
"definition": {"pages":[{"cube_name":"Issue Type management","name":"Issue Type","selected_set":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"],"members":[{"depth":0,"name":"All Issue Types by standard or sub-task","full_name":"[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]","drillable":true,"type":"all","caption":"All Issue Types by standard or sub-task","expanded":true,"drilled_into":false}],"current_page_members":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"]}],"reports":[{"width":25,"cube_report_name":"Issues created by Issue Type","cube_name":"Issue Type management","folder_name":"Issue Type usage by Projects"},{"width":25,"cube_report_name":"Issue Type usage in Projects","cube_name":"Issue Type management","folder_name":"Issue Type usage by Projects"},{"width":50,"cube_report_name":"Issue Types with no existing Issues","cube_name":"Issue Type management","folder_name":"issue Type usage by Schemes"}],"pages_options":{}}
},{
"name": "Project Issue Type management",
"definition": {"pages":[{"cube_name":"Issue Type management","name":"Project","selected_set":["[Project].[All Projects]"],"members":[{"depth":0,"name":"All Projects","full_name":"[Project].[All Projects]","drillable":true,"type":"all","expanded":true,"drilled_into":false,"caption":"All Projects"}],"current_page_members":["[Project].[All Projects]"]}],"reports":[{"width":25,"cube_report_name":"Issue Type Scheme usage in Projects","cube_name":"Issue Type management"},{"width":25,"cube_report_name":"Project Issues created","cube_name":"Issue Type management","folder_name":"Project reports"},{"width":33.33,"height":780,"cube_report_name":"Project Issue Types","cube_name":"Issue Type management","folder_name":"Project reports"}],"pages_options":{}}
} ],
"dashboard_reports": [ {
"cube_name": "Issue Type management",
"cube_reports": [ {
"name": "Issues created by Issue Type",
"folder_name": "Issue Type usage by Projects",
"result_view": "table",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Icon]","[Measures].[Issues created]"],"members":[]}]},"rows":{"dimensions":[{"name":"Issue Type","selected_set":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"],"selected_set_expression":"DescendantsSet({{selected_set}}, [Issue Type.Standard or Sub-task].[Issue Type])","members":[],"bookmarked_members":[]}]},"pages":{"dimensions":[{"name":"Issue Type","duplicate":true,"selected_set":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"],"members":[{"depth":0,"name":"All Issue Types by standard or sub-task","full_name":"[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]","drillable":true,"type":"all"}],"bookmarked_members":[],"current_page_members":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"]}]},"options":{},"view":{"current":"table","maximized":false,"table":{"row_dimension_headers":{"Issue Type":true},"cell_formatting":{"[Measures].[Issues created]":{"type":"exact_value","mdx":"CASE WHEN\n [Issue Type].CurrentHierarchyMember.Level.Name = \"Standard or Sub-task\"\nTHEN\n \"Upper level\"\nELSE\n CASE WHEN\n [Measures].[Issues created] = 0\n THEN\n \"Empty\"\n END\nEND","whole_row":true,"rules":[{"exact_value":"Empty","text_color":"#D4153B"},{"exact_value":"Upper level","background_color":"#F1F2F4/*custom*/"}]}}}},"calculated_members":[]}
},{
"name": "Issue Type usage in Projects",
"folder_name": "Issue Type usage by Projects",
"result_view": "table",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Icon]","[Measures].[Issue Type used in projects]"],"members":[{"depth":0,"full_name":"[Measures].[Issue Type used in projects]","format_string":"HTMLFormatter","report_specific":true,"name":"Issue Type used in projects","calculated":true,"id":"[Measures].[Issue Type used in projects]"}]}]},"rows":{"dimensions":[{"name":"Issue Type","selected_set":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"],"selected_set_expression":"DescendantsSet({{selected_set}}, [Issue Type.Standard or Sub-task].[Issue Type])","members":[],"bookmarked_members":[]}],"nonempty_crossjoin":false},"pages":{"dimensions":[{"name":"Issue Type","duplicate":true,"selected_set":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"],"members":[{"depth":0,"name":"All Issue Types by standard or sub-task","full_name":"[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]","drillable":true,"type":"all"}],"bookmarked_members":[],"current_page_members":["[Issue Type.Standard or Sub-task].[All Issue Types by standard or sub-task]"]}]},"options":{},"view":{"current":"table","maximized":false,"table":{"row_dimension_headers":{"Issue Type":true},"cell_formatting":{"[Measures].[Icon]":{"type":"exact_value","rules":[{"background_color":"#F1F2F4/*custom*/"}]}}}},"calculated_members":[]}
},{
"name": "Issue Types with no existing Issues",
"folder_name": "issue Type usage by Schemes",
"result_view": "table",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Icon]","[Measures].[Issues created]","[Measures].[Issue Type usage]","[Measures].[Issue Type used in Schemes]"],"members":[{"depth":0,"full_name":"[Measures].[Issue Type usage]","format_string":"HTMLFormatter","report_specific":true,"name":"Issue Type usage","calculated":true}]}]},"rows":{"dimensions":[{"name":"Issue Type","selected_set":["[Issue Type].[Issue Type].Members"],"members":[],"bookmarked_members":[]}],"filter_by":{"conditions":[{"expression":["[Measures].[Issues created]"],"operator":"matches","value":"."},{"expression":["[Measures].[Issues created]"],"operator":"=","value":"0"}]},"nonempty_crossjoin":true},"pages":{"dimensions":[]},"options":{},"view":{"current":"table","maximized":false,"table":{"row_dimension_headers":{"Issue Type":true},"cell_formatting":{"[Measures].[Issues created]":{"type":"exact_value","rules":[{"exact_value":"0","background_color":"#FFE4EE"}]}}}},"calculated_members":[]}
},{
"name": "Issue Type Scheme usage in Projects",
"result_view": "table",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Scheme used in Projects]"],"members":[]}]},"rows":{"dimensions":[{"name":"Issue Type Scheme","selected_set":["[Issue Type Scheme].[Issue Type Scheme].Members"],"members":[],"bookmarked_members":[]}],"nonempty_crossjoin":false},"pages":{"dimensions":[]},"options":{},"view":{"current":"table","maximized":false,"table":{"row_dimension_headers":{"Issue Type Scheme":true},"cell_formatting":{"[Measures].[Scheme used in Projects]":{"type":"exact_value","rules":[{"exact_value":"Scheme not used in any projects","text_color":"#D4153B"}]}}}},"calculated_members":[]}
},{
"name": "Project Issues created",
"folder_name": "Project reports",
"result_view": "table",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Project Icon]","[Measures].[Issues created]"],"members":[]}]},"rows":{"dimensions":[{"name":"Project","selected_set":["[Project].[All Projects]"],"selected_set_expression":"DescendantsSet({{selected_set}}, [Project].[Project])","members":[],"bookmarked_members":[]}],"nonempty_crossjoin":true},"pages":{"dimensions":[{"name":"Project","duplicate":true,"selected_set":["[Project].[All Projects]"],"members":[{"depth":0,"name":"All Projects","full_name":"[Project].[All Projects]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":[],"current_page_members":["[Project].[All Projects]"]}]},"options":{},"view":{"current":"table","maximized":false,"table":{"row_dimension_headers":{"Project":true},"cell_formatting":{"[Measures].[Issues created]":{"type":"exact_value","rules":[{"exact_value":"0","text_color":"#D4153B"}]}}}},"calculated_members":[]}
},{
"name": "Project Issue Types",
"folder_name": "Project reports",
"result_view": "table",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Icon]","[Measures].[Issues created]"],"members":[]}]},"rows":{"dimensions":[{"name":"Project","selected_set":["[Project].[All Projects]"],"selected_set_expression":"DescendantsSet({{selected_set}}, [Project].[Project])","members":[],"bookmarked_members":[]},{"name":"Issue Type","selected_set":["[Issue Type].[Issue Type].Members"],"members":[],"bookmarked_members":[]}],"nonempty_crossjoin":true},"pages":{"dimensions":[{"name":"Project","duplicate":true,"selected_set":["[Project].[All Projects]"],"members":[{"depth":0,"name":"All Projects","full_name":"[Project].[All Projects]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":[],"current_page_members":["[Project].[All Projects]"]}]},"options":{},"view":{"current":"table","maximized":false,"table":{"row_dimension_headers":{"Project":true,"Issue Type":true},"cell_formatting":{"[Measures].[Issues created]":{"type":"exact_value","rules":[{"exact_value":"0","text_color":"#D4153B"}]}}}},"calculated_members":[]}
} ],
"calculated_members": [{"name":"Issue Type Icon URL","dimension":"Measures","formula":"[Issue Type].CurrentHierarchyMember.get('Icon URL')","format_string":""},{"name":"Icon","dimension":"Measures","formula":"CASE WHEN\n [Issue Type].CurrentHierarchyMember.Level.Name = \"Issue Type\"\nTHEN\n \"\u003cimg src='\"||[Measures].[Issue Type Icon URL]||\"' style='width:16px; height:16px' /\u003e\"\nEND","format_string":"HTMLFormatter"},{"name":"Issue Type used in projects","dimension":"Measures","formula":"CASE WHEN\n [Issue Type].CurrentHierarchyMember.Level.Name = \"Issue Type\"\nTHEN\n CASE WHEN\n Count(\n Filter(\n Descendants([Project].CurrentMember,[Project].[Project]),\n [Measures].[Row count] \u003e 0\n )\n ) \u003e 0\n THEN\n Generate(\n Filter(\n Descendants([Project].CurrentMember,[Project].[Project]),\n [Measures].[Row count] \u003e 0\n ),\n \"\u003cimg src='\"||[Project].CurrentHierarchyMember.Get('Icon URL')||\"' style='width:16px; height:16px' /\u003e \" || [Project].CurrentMember.Name || \" (\" || [Project].CurrentMember.KEY || \")\u003cbr /\u003e\",\n CHR(10)\n )\n ELSE\n \"Issue Type not used in any projects\"\n END\nEND","format_string":"HTMLFormatter"},{"name":"Issue Type usage","dimension":"Measures","formula":"CASE WHEN\n [Issue Type].CurrentHierarchyMember.Level.Name = \"Issue Type\"\nTHEN\n CASE WHEN\n Count(\n Filter(\n Descendants([Project].CurrentMember,[Project].[Project]),\n [Measures].[Row count] \u003e 0\n )\n ) \u003e 0\n THEN\n Generate(\n Filter(\n Descendants([Project].CurrentMember,[Project].[Project]),\n [Measures].[Row count] \u003e 0\n ),\n \"\u003cimg src='\"||[Project].CurrentHierarchyMember.Get('Icon URL')||\"' style='width:16px; height:16px' /\u003e \" || [Project].CurrentMember.Name || \" (\" || [Project].CurrentMember.KEY || \")\u003cbr /\u003e\",\n CHR(10)\n )\n ELSE\n \"Issue Type not used in any projects\"\n END\nEND","format_string":"HTMLFormatter"},{"name":"Issue Type used in Schemes","dimension":"Measures","formula":"CASE WHEN\n [Issue Type].CurrentHierarchyMember.Level.Name = \"Issue Type\"\nTHEN\n CASE WHEN\n Count(\n Filter(\n Descendants([Issue Type Scheme].CurrentMember,[Issue Type Scheme].[Issue Type Scheme]),\n [Measures].[Row count] \u003e 0\n )\n ) \u003e 0\n THEN\n Generate(\n Filter(\n Descendants([Issue Type Scheme].CurrentMember,[Issue Type Scheme].[Issue Type Scheme]),\n [Measures].[Row count] \u003e 0\n ),\n [Issue Type Scheme].CurrentHierarchyMember.Name,\n CHR(10)\n )\n ELSE\n \"Scheme not used in any projects\"\n END\nEND","format_string":""},{"name":"Scheme used in Projects","dimension":"Measures","formula":"CASE WHEN\n [Issue Type Scheme].CurrentHierarchyMember.Level.Name = \"Issue Type Scheme\"\nTHEN\n CASE WHEN\n Count(\n Filter(\n Descendants([Project].CurrentMember,[Project].[Project]),\n [Measures].[Row count] \u003e 0\n )\n ) \u003e 0\n THEN\n Generate(\n Filter(\n Descendants([Project].CurrentMember,[Project].[Project]),\n [Measures].[Row count] \u003e 0\n ),\n \"\u003cimg src='\"||[Project].CurrentHierarchyMember.Get('Icon URL')||\"' style='width:16px; height:16px' /\u003e \" || [Project].CurrentMember.Name || \" (\" || [Project].CurrentMember.KEY || \")\u003cbr /\u003e\",\n CHR(10)\n )\n ELSE\n \"Scheme not used in any projects\"\n END\nEND","format_string":"HTMLFormatter"},{"name":"Project Icon URL","dimension":"Measures","formula":"[Project].CurrentHierarchyMember.get('Icon URL')","format_string":""},{"name":"Project Icon","dimension":"Measures","formula":"CASE WHEN\n [Project].CurrentHierarchyMember.Level.Name = \"Project\"\nTHEN\n \"\u003cimg src='\"||[Measures].[Project Icon URL]||\"' style='width:16px; height:16px' /\u003e\"\nEND","format_string":"HTMLFormatter"}]
} ]
}
Now you can analyze the Issue Type and Issue Type Scheme usage in your Jira!
Please note that these are global issue types and schemes that can be used across several projects, this analysis does not include Team-managed issue types.
Let me know if you have any questions on this!
​Best regards,
​Nauris