To do #1284 » scrum_16_2.patch
| app/views/sprints/show.html.erb (working copy) | ||
|---|---|---|
| 8 | 8 |
:locals => {:project => @project, :sprint => @sprint, :path => method(:sprint_path)} %>
|
| 9 | 9 | |
| 10 | 10 |
<%- sprint_board_id = 'sprint_board' -%> |
| 11 |
<% cache [ "v4", @sprint ] do %> |
|
| 11 | 12 |
<table class="sprint-board"> |
| 12 | 13 |
<thead class="sprint-board"> |
| 13 | 14 |
<tr class="sprint-board"> |
| ... | ... | |
| 26 | 27 |
<%- end -%> |
| 27 | 28 |
</tbody> |
| 28 | 29 |
</table> |
| 30 |
<% end %> |
|
| 29 | 31 | |
| 30 | 32 |
<%- if User.current.allowed_to?(:add_issues, @project) and |
| 31 | 33 |
User.current.allowed_to?(:edit_sprint_board, @project) and |
| init.rb (working copy) | ||
|---|---|---|
| 24 | 24 |
Query.send(:include, Scrum::QueryPatch) |
| 25 | 25 |
Tracker.send(:include, Scrum::TrackerPatch) |
| 26 | 26 |
User.send(:include, Scrum::UserPatch) |
| 27 |
TimeEntry.send(:include, Scrum::TimeEntryPatch) |
|
| 27 | 28 | |
| 28 | 29 |
require_dependency 'scrum/helper_hooks' |
| 29 | 30 |
require_dependency 'scrum/view_hooks' |
| lib/scrum/issue_patch.rb (working copy) | ||
|---|---|---|
| 12 | 12 |
def self.included(base) |
| 13 | 13 |
base.class_eval do |
| 14 | 14 | |
| 15 |
belongs_to :sprint |
|
| 15 |
belongs_to :sprint, :touch => true
|
|
| 16 | 16 |
has_many :pending_efforts, -> { order('date ASC') }
|
| 17 | 17 | |
| 18 | 18 |
acts_as_list :scope => :sprint |
| ... | ... | |
| 35 | 35 |
(issue.status_id_changed? or issue.new_record?) and |
| 36 | 36 |
issue.is_task? and !issue.parent_id.nil? |
| 37 | 37 |
} |
| 38 |
before_save :touch_sprint, :if => lambda { |issue|
|
|
| 39 |
issue.project.scrum? |
|
| 40 |
} |
|
| 38 | 41 | |
| 39 | 42 |
def has_story_points? |
| 40 | 43 |
((!((custom_field_id = Scrum::Setting.story_points_custom_field_id).nil?)) and |
| ... | ... | |
| 390 | 393 |
end |
| 391 | 394 |
end |
| 392 | 395 | |
| 396 |
def touch_sprint |
|
| 397 |
if sprint |
|
| 398 |
sprint.touch |
|
| 399 |
sprint.save! |
|
| 400 |
end |
|
| 401 |
if (old_sprint = Sprint.find_by_id(sprint_id_was)) |
|
| 402 |
old_sprint.touch |
|
| 403 |
old_sprint.save! |
|
| 404 |
end |
|
| 405 |
end |
|
| 406 | ||
| 393 | 407 |
def min_position |
| 394 | 408 |
min = nil |
| 395 | 409 |
unless sprint.nil? |
| lib/scrum/time_entry_patch.rb (working copy) | ||
|---|---|---|
| 1 |
# Copyright © Emilio González Montaña |
|
| 2 |
# Licence: Attribution & no derivates |
|
| 3 |
# * Attribution to the plugin web page URL should be done if you want to use it. |
|
| 4 |
# https://redmine.ociotec.com/projects/redmine-plugin-scrum |
|
| 5 |
# * No derivates of this plugin (or partial) are allowed. |
|
| 6 |
# Take a look to licence.txt file at plugin root folder for further details. |
|
| 7 |
|
|
| 8 |
require_dependency 'time_entry' |
|
| 9 |
|
|
| 10 |
module Scrum |
|
| 11 |
module TimeEntryPatch |
|
| 12 |
def self.included(base) |
|
| 13 |
base.class_eval do |
|
| 14 |
|
|
| 15 |
before_save :touch_issue, :if => lambda { |issue|
|
|
| 16 |
issue.project.scrum? |
|
| 17 |
} |
|
| 18 |
|
|
| 19 |
private |
|
| 20 |
|
|
| 21 |
def touch_issue |
|
| 22 |
if issue |
|
| 23 |
issue.touch |
|
| 24 |
issue.save! |
|
| 25 |
end |
|
| 26 |
end |
|
| 27 |
|
|
| 28 |
end |
|
| 29 |
end |
|
| 30 |
end |
|
| 31 |
end |
|