Allow bulk editing of parent issue (#5831).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5224 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
590cc111fc
commit
ca5951b4f6
|
@ -55,6 +55,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
|
<% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||||
|
<p>
|
||||||
|
<label><%= l(:field_parent_issue) %></label>
|
||||||
|
<%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
|
||||||
|
</p>
|
||||||
|
<div id="parent_issue_candidates" class="autocomplete"></div>
|
||||||
|
<%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %>
|
||||||
|
<% end %>
|
||||||
<p>
|
<p>
|
||||||
<label><%= l(:field_start_date) %></label>
|
<label><%= l(:field_start_date) %></label>
|
||||||
<%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
|
<%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
|
||||||
|
|
|
@ -1091,6 +1091,8 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'bulk_edit'
|
assert_template 'bulk_edit'
|
||||||
|
|
||||||
|
assert_tag :input, :attributes => {:name => 'issue[parent_issue_id]'}
|
||||||
|
|
||||||
# Project specific custom field, date type
|
# Project specific custom field, date type
|
||||||
field = CustomField.find(9)
|
field = CustomField.find(9)
|
||||||
assert !field.is_for_all?
|
assert !field.is_for_all?
|
||||||
|
@ -1108,6 +1110,9 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'bulk_edit'
|
assert_template 'bulk_edit'
|
||||||
|
|
||||||
|
# Can not set issues from different projects as children of an issue
|
||||||
|
assert_no_tag :input, :attributes => {:name => 'issue[parent_issue_id]'}
|
||||||
|
|
||||||
# Project specific custom field, date type
|
# Project specific custom field, date type
|
||||||
field = CustomField.find(9)
|
field = CustomField.find(9)
|
||||||
assert !field.is_for_all?
|
assert !field.is_for_all?
|
||||||
|
@ -1198,6 +1203,19 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
assert issue.closed?
|
assert issue.closed?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_bulk_update_parent_id
|
||||||
|
@request.session[:user_id] = 2
|
||||||
|
post :bulk_update, :ids => [1, 3],
|
||||||
|
:notes => 'Bulk editing parent',
|
||||||
|
:issue => {:priority_id => '', :assigned_to_id => '', :status_id => '', :parent_issue_id => '2'}
|
||||||
|
|
||||||
|
assert_response 302
|
||||||
|
parent = Issue.find(2)
|
||||||
|
assert_equal parent.id, Issue.find(1).parent_id
|
||||||
|
assert_equal parent.id, Issue.find(3).parent_id
|
||||||
|
assert_equal [1, 3], parent.children.collect(&:id).sort
|
||||||
|
end
|
||||||
|
|
||||||
def test_bulk_update_custom_field
|
def test_bulk_update_custom_field
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
# update issues priority
|
# update issues priority
|
||||||
|
|
Loading…
Reference in New Issue