{"issue":{"state":"open","pull_request":{"diff_url":"https://github.com/relaxdiego/redmine_backlogs/pull/292.diff","html_url":"https://github.com/relaxdiego/redmine_backlogs/pull/292","patch_url":"https://github.com/relaxdiego/redmine_backlogs/pull/292.patch"},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/4c2f710a6974e5508cbca2b62fc326e6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4c2f710a6974e5508cbca2b62fc326e6","url":"https://api.github.com/users/alminium","login":"alminium","id":1012052},"updated_at":"2011-10-30T11:39:10Z","labels":[],"assignee":null,"closed_at":null,"comments":20,"url":"https://api.github.com/repos/relaxdiego/redmine_backlogs/issues/292","body":"When all tasks are closed, story will close automatically.\r\n","html_url":"https://github.com/relaxdiego/redmine_backlogs/issues/292","title":"Story auto close","number":292,"id":1935934,"created_at":"2011-10-18T03:35:20Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/047813f350e12f0c20213378ce807e94?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"047813f350e12f0c20213378ce807e94","url":"https://api.github.com/users/friflaj","login":"friflaj","id":132108},"updated_at":"2011-10-30T11:39:10Z","url":"https://api.github.com/repos/relaxdiego/redmine_backlogs/issues/comments/2569202","body":"You don't actually need to remove the Feedback state, it could simply not be available to the current user due to workflow restrictions. Silent-fail (which is the same as transparently disable I think) is going to cause some puzzlement. Loudly-complain is still better I think. The rails Flash could be a good place for this.\r\n\r\n* The user needs to set default_percentage for each state.\r\n\r\nyes\r\n\r\n* When all tasks are closed the average percentage of these tasks are used to choose which state the story is changed to. \r\n\r\nThe avg of the default_done_ratio of all task states, not just the closed ones.\r\n\r\n* E.g. tasks average 100% - closest state (without ticking close) could then be feedback at e.g. 80%?\r\n\r\nIn the case that all tasks are closed then yes.\r\n\r\n* What about if some of the tasks were rejected? This could change the average quite much.\r\n\r\n* Rejected could get 99%. Anything that's closed and not 100% counts as rejected\r\n\r\n* But then again - if one wants Feedback-state the percentages can just be set to ensure Feedback-state will always be the chosen one when all tasks are closed.\r\n\r\nRight, and it works with the principle of least surprise (I think).\r\n\r\nAnother approach that doesn't use default_done_ratios could be to just use the RM state ordering, and don't use any non-closed tasks: when all tasks are either rejected or accepted, pick the \"right-most\" story state that's available to the person doing the last closing where that state is not a closed one. That might be a lot simpler come to think of if. Even less of a surprise. The downside of this is that when a new task is added or a task is re-opened, the story will remain in the feedback state.","id":2569202,"created_at":"2011-10-30T11:39:10Z"}}