@@ -873,6 +873,11 class Issue < ActiveRecord::Base | |||||
873 | end |
|
873 | end | |
874 | end |
|
874 | end | |
875 |
|
875 | |||
|
876 | # Returns the original tracker | |||
|
877 | def tracker_was | |||
|
878 | Tracker.find_by_id(tracker_id_was) | |||
|
879 | end | |||
|
880 | ||||
876 | # Returns the users that should be notified |
|
881 | # Returns the users that should be notified | |
877 | def notified_users |
|
882 | def notified_users | |
878 | notified = [] |
|
883 | notified = [] |
@@ -1,4 +1,4 | |||||
1 |
<h2><%= "#{@issue.tracker |
|
1 | <h2><%= "#{@issue.tracker_was} ##{@issue.id}" %></h2> | |
2 |
|
2 | |||
3 | <%= render :partial => 'edit' %> |
|
3 | <%= render :partial => 'edit' %> | |
4 | <% content_for :header_tags do %> |
|
4 | <% content_for :header_tags do %> |
@@ -3057,6 +3057,17 class IssuesControllerTest < ActionController::TestCase | |||||
3057 | assert_mail_body_match "Project changed from eCookbook to OnlineStore", mail |
|
3057 | assert_mail_body_match "Project changed from eCookbook to OnlineStore", mail | |
3058 | end |
|
3058 | end | |
3059 |
|
3059 | |||
|
3060 | def test_put_update_trying_to_move_issue_to_project_without_tracker_should_not_error | |||
|
3061 | target = Project.generate!(:tracker_ids => []) | |||
|
3062 | assert target.trackers.empty? | |||
|
3063 | issue = Issue.generate! | |||
|
3064 | @request.session[:user_id] = 1 | |||
|
3065 | ||||
|
3066 | put :update, :id => issue.id, :issue => {:project_id => target.id} | |||
|
3067 | assert_response :success | |||
|
3068 | assert_template 'edit' | |||
|
3069 | end | |||
|
3070 | ||||
3060 | def test_put_update_with_tracker_change |
|
3071 | def test_put_update_with_tracker_change | |
3061 | @request.session[:user_id] = 2 |
|
3072 | @request.session[:user_id] = 2 | |
3062 | ActionMailer::Base.deliveries.clear |
|
3073 | ActionMailer::Base.deliveries.clear |
General Comments 0
You need to be logged in to leave comments.
Login now