Coding Global Background
Coding Global

how to loop items pulled into a new cell

Archiviert 6 months ago
3 Nachrichten
2 Mitglieder
Erstellt 7 months ago
Aktualisiert 7 months ago
In Discord öffnen
M
Masks
Script Kiddie!
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>

Antworten (2)