internal static void FeedAdd(string action, Note note) { var feed = FeedRepository.FeedNew(action, SourceType.Note, note.NoteId); switch ((SourceType)note.SourceTypeId) { case SourceType.Project: feed.Sources.Add(SourceType.Project, note.SourceId); break; case SourceType.Sprint: var sprint = SprintRepository.SprintFetch(note.SourceId); feed.Sources.Add(SourceType.Project, sprint.ProjectId); feed.Sources.Add(SourceType.Sprint, sprint.SprintId); break; case SourceType.Story: var story = StoryRepository.StoryFetch(note.SourceId); feed.Sources.Add(SourceType.Project, story.ProjectId); feed.Sources.Add(SourceType.Story, story.StoryId); break; } feed.Description = note.Body; feed.Save(); }
public static void StoryUpdateDuration(int storyId) { var story = StoryRepository.StoryFetch(storyId); var hour = HourRepository.HourFetchInfoList(story); story.Duration = hour.Sum(row => row.Duration); StoryRepository.StoryUpdate(story); }
public static bool StoryDelete(int storyId) { return(StoryRepository.StoryDelete( StoryRepository.StoryFetch(storyId))); }