---
title: "Issues in status report"
canonical: "https://support.appfire.com/space/PSJ/15482357/Issues%20in%20status%20report"
format: markdown
---
> Macro (aura-html)


<span style="color: #172b4d">The fallowing code will display a report showing how many issues are in a certain status, based on your choice of project and chart type.</span>

|  |
| --- |
| `number[] statusCount;`  
   
`string [] issues = selectIssues(``"project = "` `+ argv[``0``]);`  
`for``(string iss in issues) {`  
`    ``string currStatus = iss.status;`  
`    ``if``(isNull(statusCount[currStatus])) {`  
`        ``statusCount[currStatus] = ``1``;`  
`    ``} ``else` `{`  
`        ``statusCount[currStatus] += ``1``;`  
`    ``}`  
`}`  
   
`SILReportingChartDataset datasets;`  
`datasets.label = ``"Issues"``;`  
`datasets.backgroundColor = {``"#3e95cd"``, ``"#8e5ea2"``,``"#3cba9f"``,``"#e8c3b9"``,``"#c45850"``};`  
`datasets.data = statusCount;`  
   
`SILReportingChartData data;`  
`data.labels = arrayKeys(statusCount);`  
`data.datasets = {datasets};`  
   
`SILReportingChartTitle title;`  
`title.display = ``true``;`  
`title.text = ``"Issues in status"``;`  
   
`SILReportingChartLegend legend;`  
`legend.display = ``true``;`  
`legend.position = ``"top"``;`  
   
`SILReportingChartOptions options;`  
`options.title = title;`  
`options.aspectRatio = ``1.5``;`  
   
   
`SILReportingChart chart;`  
`chart.type = argv[``1``]; ``//line, bar, pie, doughnut`  
`chart.data = data;`  
`chart.options = options;`  
   
`silreporting_createAutocompleteSelectList(``"Project"``, {``"TEST"``, ``"test"``, ``"test"` `, ``"FIBER"``, ``"FIBR"``, ``"fibr"``, ``"GERBEI"``, ``"GRBI"``, ``"grbi"``}, ``"TEST"``);`  
`silreporting_createSelectList(``"Chart Type"``, {``"Line"``, ``"line"``, ``"line"` `, ``"Bar"``, ``"bar"``, ``"bar"``, ``"Pie"``, ``"pie"``, ``"pie"``, ``"Doughnut"``, ``"doughnut"``, ``"doughnut"``}, ``"pie"``);`  
   
`return` `chart;` |

![image](media://42e4d22e-37b7-48fb-92e1-4672791fc5f4)