mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Don't create a journal when creating an issue with attachments.
git-svn-id: http://svn.redmine.org/redmine/trunk@13733 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2462a8581d
commit
95810125bf
@ -407,9 +407,9 @@ class IssuesController < ApplicationController
|
||||
def build_new_issue_from_params
|
||||
if params[:id].blank?
|
||||
@issue = Issue.new
|
||||
@issue.init_journal(User.current)
|
||||
if params[:copy_from]
|
||||
begin
|
||||
@issue.init_journal(User.current)
|
||||
@copy_from = Issue.visible.find(params[:copy_from])
|
||||
@link_copy = link_copy?(params[:link_copy]) || request.get?
|
||||
@copy_attachments = params[:copy_attachments].present? || request.get?
|
||||
|
||||
@ -2225,9 +2225,11 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
|
||||
assert_difference 'Issue.count' do
|
||||
assert_difference 'Attachment.count' do
|
||||
post :create, :project_id => 1,
|
||||
:issue => { :tracker_id => '1', :subject => 'With attachment' },
|
||||
:attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
|
||||
assert_no_difference 'Journal.count' do
|
||||
post :create, :project_id => 1,
|
||||
:issue => { :tracker_id => '1', :subject => 'With attachment' },
|
||||
:attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user