Feature #6687 » no_priority_rollup.diff
| models/issue.rb 2011-04-28 14:20:34.804207000 -0400 | ||
|---|---|---|
|
end
|
||
|
|
||
|
unless leaf?
|
||
|
attrs.reject! {|k,v| %w(priority_id done_ratio start_date due_date estimated_hours).include?(k)}
|
||
|
# NO-PRIORITY-ROLLUP, allow priority to be updated independently in parent
|
||
|
#attrs.reject! {|k,v| %w(priority_id done_ratio start_date due_date estimated_hours).include?(k)}
|
||
|
attrs.reject! {|k,v| %w(done_ratio start_date due_date estimated_hours).include?(k)}
|
||
|
end
|
||
|
|
||
|
if attrs.has_key?('parent_issue_id')
|
||
| ... | ... | |
|
# Checks parent issue assignment
|
||
|
if @parent_issue
|
||
|
if @parent_issue.project_id != project_id
|
||
|
errors.add :parent_issue_id, :not_same_project
|
||
|
# Comment out to add Redmine Feature #5487 - cwolf
|
||
|
#errors.add :parent_issue_id, :not_same_project
|
||
|
elsif !new_record?
|
||
|
# moving an existing issue
|
||
|
if @parent_issue.root_id != root_id
|
||
| ... | ... | |
|
def recalculate_attributes_for(issue_id)
|
||
|
if issue_id && p = Issue.find_by_id(issue_id)
|
||
|
# priority = highest priority of children
|
||
|
if priority_position = p.children.maximum("#{IssuePriority.table_name}.position", :include => :priority)
|
||
|
p.priority = IssuePriority.find_by_position(priority_position)
|
||
|
end
|
||
|
# NO-PRIORITY-ROLLUP, comment out this if-block to allow priority to be updated independently in parent
|
||
|
# priority = highest priority of childre
|
||
|
#if priority_position = p.children.maximum("#{IssuePriority.table_name}.position", :include => :priority)
|
||
|
# p.priority = IssuePriority.find_by_position(priority_position)
|
||
|
#end
|
||
|
|
||
|
# start/due dates = lowest/highest dates of children
|
||
|
p.start_date = p.children.minimum(:start_date)
|
||
|
-- views/issues/_attributes.rhtml.orig 2011-03-07 20:41:00.000000000 -0500
|
||
|
++ views/issues/_attributes.rhtml 2011-04-28 14:13:19.554207000 -0400
|
||
| ... | ... | |
|
<p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
|
||
|
<% end %>
|
||
|
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true}, :disabled => !@issue.leaf? %></p>
|
||
|
<!-- NO-PRIORITY-ROLLUP, allow priority to be updated independently in parent -->
|
||
|
<!--p><%# f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true}, :disabled => !@issue.leaf? %></p-->
|
||
|
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
|
||
|
<p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p>
|
||
|
<% unless @project.issue_categories.empty? %>
|
||
|
<p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
|
||