mirror of
https://github.com/redmine/redmine.git
synced 2025-11-06 21:35:46 +01:00
Don't create a journal when creating an issue.
git-svn-id: http://svn.redmine.org/redmine/trunk@13732 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -52,11 +52,14 @@ class Journal < ActiveRecord::Base
|
|||||||
|
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
super
|
super
|
||||||
if journalized && journalized.new_record?
|
if journalized
|
||||||
|
if journalized.new_record?
|
||||||
self.notify = false
|
self.notify = false
|
||||||
end
|
else
|
||||||
start
|
start
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def save(*args)
|
def save(*args)
|
||||||
journalize_changes
|
journalize_changes
|
||||||
|
|||||||
@@ -1799,6 +1799,7 @@ class IssuesControllerTest < ActionController::TestCase
|
|||||||
def test_post_create
|
def test_post_create
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
assert_difference 'Issue.count' do
|
assert_difference 'Issue.count' do
|
||||||
|
assert_no_difference 'Journal.count' do
|
||||||
post :create, :project_id => 1,
|
post :create, :project_id => 1,
|
||||||
:issue => {:tracker_id => 3,
|
:issue => {:tracker_id => 3,
|
||||||
:status_id => 2,
|
:status_id => 2,
|
||||||
@@ -1809,6 +1810,7 @@ class IssuesControllerTest < ActionController::TestCase
|
|||||||
:estimated_hours => '',
|
:estimated_hours => '',
|
||||||
:custom_field_values => {'2' => 'Value for field 2'}}
|
:custom_field_values => {'2' => 'Value for field 2'}}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
|
assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
|
||||||
|
|
||||||
issue = Issue.find_by_subject('This is the test_new issue')
|
issue = Issue.find_by_subject('This is the test_new issue')
|
||||||
|
|||||||
Reference in New Issue
Block a user