Skip to content

Commit

Permalink
Change tab and burndown behaviour on reload issues
Browse files Browse the repository at this point in the history
Tabs won't change on reload
Burndown chart will stay on same sprint
  • Loading branch information
Lilyheart committed Nov 21, 2019
1 parent cbb4aaa commit 7e9aa33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions scripts/burndown.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ var burndown = (function () {
disabledField: "disabled",
create: false
});
$("#milestone-dropdown").selectize()[0].selectize.setValue("All", false);
$("#milestone-dropdown").selectize()[0].selectize.setValue(selectedMilestone, false);

}

Expand Down Expand Up @@ -636,8 +636,14 @@ var burndown = (function () {

return {
updateBurndownData: async function(newMilestone) {
if (newMilestone === "Auto" && !selectedMilestone) {
selectedMilestone = "All";
} else if (newMilestone === "Auto") {
// No changes to selectedMilestone
} else {
selectedMilestone = newMilestone;
}
today = new Date(new Date().setHours(0, 0, 0, 0)).getTime() - (new Date()).getTimezoneOffset() * MSperMIN;
selectedMilestone = newMilestone;
await updateBurndownData();

return;
Expand Down
2 changes: 1 addition & 1 deletion scripts/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ var issues = (function () {
setPhase("issue_end");

burndown.setBurndownUnloaded();
await burndown.updateBurndownData("All");
await burndown.updateBurndownData("Auto");
}

return {
Expand Down

0 comments on commit 7e9aa33

Please sign in to comment.