mirror of
https://github.com/redmine/redmine.git
synced 2026-04-02 02:31:17 +02:00
Merge r24502 and r24503 from trunk to 6.1-stable (#43804).
git-svn-id: https://svn.redmine.org/redmine/branches/6.1-stable@24504 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -213,7 +213,7 @@
|
||||
<label><%= custom_field.name %></label>
|
||||
<%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
|
||||
</p>
|
||||
<%= wikitoolbar_for "issue_custom_field_values_#{custom_field.id}", preview_issue_path(:project_id => @project, :issue_id => nil) if custom_field.full_text_formatting? %>
|
||||
<%= wikitoolbar_for "issue_custom_field_values_#{custom_field.id}", (@project ? preview_issue_path(:project_id => @project, :issue_id => nil) : preview_text_path) if custom_field.full_text_formatting? %>
|
||||
<% end %>
|
||||
|
||||
</fieldset>
|
||||
|
||||
@@ -674,4 +674,39 @@ class IssuesSystemTest < ApplicationSystemTestCase
|
||||
# assert add notes form does not exist anymore for user without required permissions on the new project
|
||||
assert page.has_no_css?('#add_notes')
|
||||
end
|
||||
|
||||
def test_preview_custom_field_on_bulk_edit_across_projects
|
||||
field = IssueCustomField.create!(
|
||||
:field_format => 'text',
|
||||
:name => 'Long text with formatting',
|
||||
:is_for_all => true,
|
||||
:text_formatting => 'full',
|
||||
:full_width_layout => '1',
|
||||
:trackers => Tracker.all
|
||||
)
|
||||
|
||||
log_user('admin', 'admin')
|
||||
|
||||
visit '/issues'
|
||||
issue1 = Issue.find(1)
|
||||
issue4 = Issue.find(4)
|
||||
assert_not_equal issue1.project_id, issue4.project_id
|
||||
|
||||
find('tr#issue-1 input[type=checkbox]').click
|
||||
find('tr#issue-4 input[type=checkbox]').click
|
||||
find('tr#issue-1 td.updated_on').right_click
|
||||
within('#context-menu') do
|
||||
click_link 'Bulk edit'
|
||||
end
|
||||
|
||||
assert_current_path '/issues/bulk_edit', :ignore_query => true
|
||||
|
||||
fill_in "issue_custom_field_values_#{field.id}", :with => 'Previewing **custom field** text'
|
||||
first(:link, 'Preview').click
|
||||
|
||||
within("div#preview_issue_custom_field_values_#{field.id}") do
|
||||
assert page.has_css?('strong', text: 'custom field')
|
||||
assert page.has_content?('Previewing custom field text')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user