Index: app/views/sprints/show.html.erb =================================================================== --- app/views/sprints/show.html.erb (revision 2) +++ app/views/sprints/show.html.erb (working copy) @@ -8,6 +8,7 @@ :locals => {:project => @project, :sprint => @sprint, :path => method(:sprint_path)} %> <%- sprint_board_id = 'sprint_board' -%> +<% cache [ "v4", @sprint ] do %> @@ -26,6 +27,7 @@ <%- end -%>
+<% end %> <%- if User.current.allowed_to?(:add_issues, @project) and User.current.allowed_to?(:edit_sprint_board, @project) and Index: init.rb =================================================================== --- init.rb (revision 2) +++ init.rb (working copy) @@ -24,6 +24,7 @@ Query.send(:include, Scrum::QueryPatch) Tracker.send(:include, Scrum::TrackerPatch) User.send(:include, Scrum::UserPatch) +TimeEntry.send(:include, Scrum::TimeEntryPatch) require_dependency 'scrum/helper_hooks' require_dependency 'scrum/view_hooks' Index: lib/scrum/issue_patch.rb =================================================================== --- lib/scrum/issue_patch.rb (revision 2) +++ lib/scrum/issue_patch.rb (working copy) @@ -12,7 +12,7 @@ def self.included(base) base.class_eval do - belongs_to :sprint + belongs_to :sprint, :touch => true has_many :pending_efforts, -> { order('date ASC') } acts_as_list :scope => :sprint @@ -35,6 +35,9 @@ (issue.status_id_changed? or issue.new_record?) and issue.is_task? and !issue.parent_id.nil? } + before_save :touch_sprint, :if => lambda { |issue| + issue.project.scrum? + } def has_story_points? ((!((custom_field_id = Scrum::Setting.story_points_custom_field_id).nil?)) and @@ -390,6 +393,17 @@ end end + def touch_sprint + if sprint + sprint.touch + sprint.save! + end + if (old_sprint = Sprint.find_by_id(sprint_id_was)) + old_sprint.touch + old_sprint.save! + end + end + def min_position min = nil unless sprint.nil? Index: lib/scrum/time_entry_patch.rb =================================================================== --- lib/scrum/time_entry_patch.rb (nonexistent) +++ lib/scrum/time_entry_patch.rb (working copy) @@ -0,0 +1,31 @@ +# Copyright © Emilio González Montaña +# Licence: Attribution & no derivates +# * Attribution to the plugin web page URL should be done if you want to use it. +# https://redmine.ociotec.com/projects/redmine-plugin-scrum +# * No derivates of this plugin (or partial) are allowed. +# Take a look to licence.txt file at plugin root folder for further details. + +require_dependency 'time_entry' + +module Scrum + module TimeEntryPatch + def self.included(base) + base.class_eval do + + before_save :touch_issue, :if => lambda { |issue| + issue.project.scrum? + } + + private + + def touch_issue + if issue + issue.touch + issue.save! + end + end + + end + end + end +end \ No newline at end of file