Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let stringPart1 = '';
- let stringPart2 = '';
- let stringPart3 = '';
- stringPart1 = '<div class="type truncate">' + type + '</div><div class="id">' + id + '</div><div class="title">' + title + '</div>';
- if (workItemDetails[x].relations) {
- workItemDetails[x].relations.forEach(function(relation) {
- if (relation.rel === 'System.LinkTypes.Hierarchy-Reverse') {
- let parentId = relation.url.split('/').slice(-1)[0];
- witClient.getWorkItem(parentId, ['System.Title']).then(function(value) {
- let parentWorkItemTitleString = value.fields['System.Title'];
- returnString = '<div class="parent-id"><strong>' + parentId + '</div><div class="parent-name">' + parentWorkItemTitleString + '</div>';
- console.log(returnString);
- stringPart2 = returnString;
- });
- }
- });
- }
- if(cardCount % 15 === 0 && x != 0) {
- stringPart3 = '</section>';
- sheetCount++;
- } else {
- stringPart3 = '';
- }
- div.innerHTML = stringPart1 + stringPart2 + stringPart3;
- document.getElementById(sheetId).appendChild(div); ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement