Skip to content

Instantly share code, notes, and snippets.

@andrevandal
Created December 14, 2021 12:51
Show Gist options
  • Save andrevandal/4d4359e2a3b4978bdae237eceddc8806 to your computer and use it in GitHub Desktop.
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.
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