<commit_before>﻿using System.Web.Mvc;
using PivotalTrackerDotNet.Domain;

namespace PivotalExtension.TaskManager.Models {
    public class StoryViewModel {

        public StoryViewModel(Story story) {
            Story = story;
        }

        public Story Story { get; set; }

        public string GetStyle() {
            return "story-details " + Story.CurrentState.ToString().ToLower();
        }

        public string GetHeader() {
            if (Story.StoryType == "bug") {
                return "Bug";
            }

            if (Story.StoryType == "chore") {
                return "Spike / Misc";
            }

            return "Story";
        }

        public string GetEstimate() {
            if (Story.Estimate > 0) {
                return Story.Estimate + " points";
            }

            return string.Empty;
        }

        public string FormattedId {
            get { return Story.ProjectId + "-" + Story.Id; }
        }

        public string AdvanceAction() {
            if (Story.CurrentState == StoryStatus.UnStarted || Story.CurrentState == StoryStatus.Finished) {
                return "start";
            }
            if (Story.CurrentState == StoryStatus.Started) {
                return "finish";
            }
            return string.Empty;
        }
    }
}<commit_msg>- changing StoryViewModel to allow restarting of rejected stories - Fix #18<commit_after>﻿using System.Web.Mvc;
using PivotalTrackerDotNet.Domain;

namespace PivotalExtension.TaskManager.Models {
    public class StoryViewModel {

        public StoryViewModel(Story story) {
            Story = story;
        }

        public Story Story { get; set; }

        public string GetStyle() {
            return "story-details " + Story.CurrentState.ToString().ToLower();
        }

        public string GetHeader() {
            if (Story.StoryType == "bug") {
                return "Bug";
            }

            if (Story.StoryType == "chore") {
                return "Spike / Misc";
            }

            return "Story";
        }

        public string GetEstimate() {
            if (Story.Estimate > 0) {
                return Story.Estimate + " points";
            }

            return string.Empty;
        }

        public string FormattedId {
            get { return Story.ProjectId + "-" + Story.Id; }
        }

        public string AdvanceAction() {
            if (Story.CurrentState == StoryStatus.UnStarted 
                || Story.CurrentState == StoryStatus.Finished 
                || Story.CurrentState == StoryStatus.Rejected) {
                return "start";
            }
            if (Story.CurrentState == StoryStatus.Started) {
                return "finish";
            }
            return string.Empty;
        }
    }
}
{'fraction_non_alphanumeric': 0.10028551034975018, 'fraction_numerical': 0.0014275517487508922, 'mean_word_length': 1.4674295774647887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5931522', 'n_tokens_mistral': 761, 'n_tokens_neox': 693, 'n_words': 164}