how to loop items pulled into a new cell
Archived 5 months ago
M
Masks
Copy Paster!
Exporting into excel the title and description all go into one cell I want it to go down one cell every new description this is the current code (uses groovy with codebeamer api)
This is the groovy code
<cb:groovy template="false" silent="false">
def resolver = com.intland.codebeamer.persistence.dao.impl.EntityCache.getInstance(user);
// a map, where the keys are the field names, the values are the referenced entities by that field
uprefs = issueReferences.getOutgoingReferences(req);
result = “”;
uprefs.each({
// it contains key/value pair: the key is the field name, the refs is a list contains the VersionReferenceDtos
fieldName = it.key
refs = it.value
//result += fieldName + ":" + refs + "\n";
// iterate all fields
refs.each({
// load the item fully: note this is suboptimal because items are loaded one-by-one
resolver.resolve(it);
result.add(fieldName + ":" + it.dto.description);
});
});
""
</cb:groovy>
