clearInProgress clears all in-progress flags by setting each in-progress story's status to "todo" in the markdown file, then reloads.
()
| 2174 | // clearInProgress clears all in-progress flags by setting each in-progress |
| 2175 | // story's status to "todo" in the markdown file, then reloads. |
| 2176 | func (a *App) clearInProgress() { |
| 2177 | dirty := false |
| 2178 | for _, story := range a.prd.UserStories { |
| 2179 | if story.InProgress { |
| 2180 | _ = prd.SetStoryStatus(a.prdPath, story.ID, "todo") |
| 2181 | dirty = true |
| 2182 | } |
| 2183 | } |
| 2184 | if dirty { |
| 2185 | if p, err := prd.LoadPRD(a.prdPath); err == nil { |
| 2186 | a.prd = p |
| 2187 | } |
| 2188 | } |
| 2189 | } |
| 2190 | |
| 2191 | // selectStoryByID sets the selected index to the story with the given ID. |
| 2192 | func (a *App) selectStoryByID(storyID string) { |
no test coverage detected