Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The table report is a simple way to display your data in a table format using the the  Simple Issue Language™ (SIL) . SIL provides predefined structures and routines that comes in help for generating such a report. 

Table of Contents

Configuring SIL Reporting Gadget

...

To configure the gadget you have to select the sil script file and add the default values for the parameters used in the selected script. 

 

Image Modified

The parameters will be passed into the program using the argv variable. The values will be available using a construct like argv["parameter_name"] or argv[position]. For the above example, the project can be retrieved using argv["projects"] or argv[0]

...

If you want to return information about another projects without having to configure the gadget, all you have to do is add a field for the projects using one of the routines for creating fields from gadget routines. After that you will be able to set parameter in the parameter section and run the report with the new value.

...

Opened vs Resolved Issues Report 

This particular example will generate a table report showing the number of opened issues vs number of resolved issues for a given list of projects. 

Code Block
string [] projects = argv[0];
string [] resolvedIssues;
string [] openedIssues;
for(string p in projects) {
    resolvedIssues[p] += countIssues("project = " + p  + " AND status in (Done, Closed, Resolved)");
    openedIssues[p] += countIssues("project = " + p  + " AND status not in (Done, Closed, Resolved)");
}

SILReportingHeader [] headers; // the hearders of the table

SILReportingHeader h1;
h1.name = "Opened Issues";
h1.sortable = "sortable";
h1.color = "white";
h1.bgColor = "#79aadb";
headers += h1;
    
SILReportingHeader h2;
h2.name = "Resolved Issues";
h2.sortable = "sortable";
h2.color = "white";
h2.bgColor = "#79aadb";
headers += h2;

string [][] rows; // populating the rows
for(string p in projects){
    rows += {openedIssues[p], resolvedIssues[p]};
}

SILReportingTable table;
table.headers = headers;
table.rows = rows;

return table;

Image Removed

Info

For more information about the predefined structures that comes in help for the table reports check the predefined structure types page.

Opened vs Resolved Issues Report  Transposed

Another feature that comes out of the box with the help of silreporting_transposeTable routine is the ability to transpose the table adn add custom headers after performing the operation. 

Code Block
string [] projects = argv[0];
string [] resolvedIssues;
string [] openedIssues;
for(string p in projects) {
    resolvedIssues[p] += countIssues("project = " + p  + " AND status in (Done, Closed, Resolved)");
    openedIssues[p] += countIssues("project = " + p  + " AND status not in (Done, Closed, Resolved)");
}
    
SILReportingHeader [] headers;

SILReportingHeader h1;
h1.name = "Opened Issues";
h1.sortable = "sortable";
h1.color = "white";
h1.bgColor = "#79aadb";
headers += h1;
    
SILReportingHeader h2;
h2.name = "Resolved Issues";
h2.sortable = "sortable";
h2.color = "white";
h2.bgColor = "#79aadb";
headers += h2;

string [][] rows;
for(string p in projects){
    rows += {openedIssues[p], resolvedIssues[p]};
}

SILReportingTable table;
table.headers = headers;
table.rows = rows;

SILReportingHeader [] transposedHeaders; // the headers of the transposed table(if it has any business meaning otherwise it can be left empty)
for(string p in projects){
    SILReportingHeader h;
    h.name = p;
    h.sortable = "sortable";
    h.color = "white";
    h.bgColor="#79aadb";
    transposedHeaders += h;
}
table = silreporting_transposeTable(table, transposedHeaders); //transposing the table

return table;

Image Removed

...

Opened vs Resolved Issues Report  Average and Sum

You can also use the silreporting_sumTable and silreporting_avgTable routines which will help you to sum up or average the data in your table. A footer will be automatically created with the results of the sum/average operation.

...

Report

Include Page
Opened vs Resolved Issues (Table Report)
Opened vs Resolved Issues (Table Report)

Opened vs Resolved Issues Report Transposed

Include Page
Opened vs Resolved Issues Report Transposed
Opened vs Resolved Issues Report Transposed

Opened vs Resolved Issues Report Average and Sum

Include Page
Opened vs Resolved Issues Report Average and Sum
Opened vs Resolved Issues Report Average and Sum