Skip to content

Instantly share code, notes, and snippets.

@teles
Last active October 28, 2019 17:24
Show Gist options
  • Save teles/1df6e98937a42f2bb5d9d0fc2eccf3a7 to your computer and use it in GitHub Desktop.
Save teles/1df6e98937a42f2bb5d9d0fc2eccf3a7 to your computer and use it in GitHub Desktop.
Gera um texto com resumo das tarefas
// https://vivadecora.atlassian.net/issues/?jql=labels%20%3D%20"depende-de-front"%20and%20Sprint%20%3D%20"6"
const resume = Array.from(document.querySelectorAll(".issuerow")).map(issue => ({
status: issue.querySelector(".status").innerText
})).reduce((total, current) => {
total[current.status] = (total[current.status] || 0) + 1;
total["TOTAL"] = (total["TOTAL"] || 0 ) + 1;
return total;
}, {});
const generate_sprint_report = (day) => `
*Dia corridos*: ${day}/10
*Sucesso do Sprint*: ${((resume.ENTREGUE || 0)/ resume.TOTAL * 100).toFixed(1) }%
*Tarefas:*
• Total : ${resume.TOTAL}
• Entregues: ${resume.ENTREGUE || 0}
• Esperando teste em prod: ${resume['ESPERANDO TESTE EM PROD'] || 0}
• Homologado: ${resume.HOMOLOGADO || 0}
• Homologando: ${resume.HOMOLOGANDO || 0}
• Code Review: ${resume['CODE REVIEW'] || 0}
• Desenvolvendo: ${resume.DESENVOLVENDO || 0}
• Backlog: ${resume.BACKLOG || 0}
`;
var days = window.prompt("Quantos dias completos o sprint já teve?");
window.prompt("Progresso do sprint", generate_sprint_report(days));
// generate_sprint_report(1) - passou um dia dos 10 dias de sprint
// generate_sprint_report(7) - passaram 7 dia dos 7 dias de sprint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment