Skip to end of banner
Go to start of banner

silreporting_transposeTable

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Syntax

silreporting_transposeTable(silTable[, transposedHeaders])

Description

Transpose the specified table.

Parameters

Parameter name

Type

Required

Description

silTabel

SILReportingTable

Yes

The table to be transposed.

transposedHeaders

SILReportingHeader []

NoList of headers that should be displayed for the transposed table.

Return type

SILReportingTable

The transposed table.

Example

string [] projects = "TEST|FIBR|STEI|GRBI|HGES|RGIS";
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";
headers += h1;
    
SILReportingHeader h2;
h2.name = "Resolved Issues";
h2.sortable = "sortable";
headers += h2;

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

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


SILReportingHeader [] transposedHeaders;
for(string p in projects){
    SILReportingHeader h;
    h.name = p;
    h.sortable = "sortable";
    transposedHeaders += h;
}

return silreporting_transposeTable(table, transposedHeaders);

  • No labels