Previously, the proposed state was not a key in the state text
dictionary.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/models/sprint.rb | 8 +++++++-
app/views/sprints/index.html.erb | 2 +-
doc/ChangeLog | 1 +
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/app/models/sprint.rb b/app/models/sprint.rb
index dd160e0..332ea64 100644
--- a/app/models/sprint.rb
+++ b/app/models/sprint.rb
@@ -73,12 +73,18 @@ class Sprint < ActiveRecord::Base
:dependent => :destroy
has_many :user_stories, :through => :backlog_items, :order => :priority
+ STATE_PROPOSED='proposed'
STATE_PLANNING='planning'
STATE_ACTIVE='active'
STATE_COMPLETED='completed'
STATE_CANCELLED='cancelled'
- STATES = {STATE_PLANNING => "Planning", STATE_ACTIVE =>
"Active", :STATE_COMPLETED => "Completed", STATE_CANCELLED =>
"Cancelled"}
+ STATES = {
+ STATE_PROPOSED => "Proposed",
+ STATE_PLANNING => "Planning",
+ STATE_ACTIVE => "Active",
+ STATE_COMPLETED => "Completed",
+ STATE_CANCELLED => "Cancelled"}
named_scope :default, { :order => "starts ASC" }
named_scope :for_product, lambda { |product_id|
diff --git a/app/views/sprints/index.html.erb b/app/views/sprints/index.html.erb
index 7f1cc79..ca2b752 100644
--- a/app/views/sprints/index.html.erb
+++ b/app/views/sprints/index.html.erb
@@ -21,7 +21,7 @@
<tr class="<%= "status-#{sprint.state}" %>">
<td><%= sprint.id %></td>
<td class="name">
- <%= link_to "#{sprint.title}
(#{Sprint::STATES[sprint.state_text]})",
+ <%= link_to "#{sprint.title} (#{sprint.state_text})",
sprint_path(sprint) %>
<%= "Hours: #{show_hours_as_ear(sprint)}" %>
<%= RedCloth.new(get_first_sentence(sprint.goals)).to_html %>
diff --git a/doc/ChangeLog b/doc/ChangeLog
index d4ade5a..2282b64 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -48,6 +48,7 @@ Change Log (0.3.0):
* #220 - When a user has project admin rights, then the link will say "Create"
not "Request". (BUG)
* #221 - When requesting a product role, the URL is broken. (BUG)
* #222 - Fixed creating/editing products using the wrong URL. (BUG)
+ * #226 - The sprint status text is not shown on the sprint list page. (BUG)
* #228 - Fixed the URL in the product creation RSS entry. (BUG)
Change Log (0.2.0):
--
1.6.2.5
Show replies by date