Created
December 14, 2021 12:51
-
-
Save andrevandal/4d4359e2a3b4978bdae237eceddc8806 to your computer and use it in GitHub Desktop.
This code will collect all issues from a sprint based on its `aria-controls-name` attr.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSprintIssues (ariaControlsName) { | |
if(!ariaControlsName) return | |
const [header, _, content] = [ | |
...document.querySelector(`[aria-controls="${ariaControlsName}"]`).children | |
] | |
const sprintName = header.querySelector('[role="button"] > div:nth-child(2)').textContent | |
console.log(sprintName) | |
const items = [...content.querySelector('[role="rowgroup"]').children] | |
items.forEach(item => { | |
const textContent = item.querySelector('[data-test-id="software-backlog.card-list.card.card-contents.accessible-card-key"] a').textContent | |
console.log(textContent) | |
}) | |
} | |
getSprintIssues('HEADER-DROP-12') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment