kinabalu / obsidian-word-sprint

Obsidian Word Sprint plugin
MIT License
41 stars 6 forks source link

Insert last sprint stats is not pulling correct data #30

Closed kinabalu closed 2 years ago

kinabalu commented 2 years ago

showing 0's for everything so something is b0rked

MalignantCarp commented 2 years ago

I wonder if this is tied to whatever makes View Stats show the first sprint and not the most recent one. Nope that's another bug, or moreover lack of feature.

MalignantCarp commented 2 years ago

So just printing out the created and id, created is undefined and id is an id. Definitely the case that we have a fresh sprint object and not the last one, for whatever reason.

Easiest way to fix this is to probably set stats to this.theSprint.getStats() only if the sprint is running, and if the sprint is not running, retrieve the last SprintRunStats object from sprintHistory and use that data instead.

kinabalu commented 2 years ago

this has been fixed in latest releases.