You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet
You have a tracker with work items with different statuses. You need to export them selecting by their statuses each statuses goes to a dedicated sheet of the excel workbook.

You can do this by applying a pre-filtering groovy script, where you can filter the required work items from the item set before you use it in the for cycle.

Here is an example: prefiltering_example.xlsx


In the Groovy script items are collected in an array named filteredItems:

<cb:groovy template="false" silent="true">
filteredItems = [];
items.each({
    if (it.getStatus().getName() == "To Do") {
        filteredItems.add(it);
    }
});
</cb:groovy>

Your main for cycle go through the items of this array:

<jt:forEach items="${filteredItems}" var="item">${item.id}

In the excel template description is formatted, we display only the plain text of the descriptions, and limit the length to 1000 characters:

${StringUtils:abbreviate(textFormatter.formatAsText(item.description, item.descriptionFormat, request, item), 1000)}