Patch #7586 » create_related_r4802_trunk_v2.diff
| app/controllers/issue_moves_controller.rb Wed Feb 09 14:38:39 2011 +0600 → app/controllers/issue_moves_controller.rb Wed Feb 09 16:41:53 2011 +0600 | ||
|---|---|---|
|
unsaved_issue_ids = []
|
||
|
moved_issues = []
|
||
|
@issues.each do |issue|
|
||
|
issue_orig_id = issue.id
|
||
|
issue.reload
|
||
|
issue.init_journal(User.current)
|
||
|
issue.current_journal.notes = @notes if @notes.present?
|
||
|
call_hook(:controller_issues_move_before_save, { :params => params, :issue => issue, :target_project => @target_project, :copy => !!@copy })
|
||
|
if r = issue.move_to_project(@target_project, new_tracker, {:copy => @copy, :attributes => extract_changed_attributes_for_move(params)})
|
||
|
moved_issues << r
|
||
|
if @copy and params[:create_related] == '1'
|
||
|
relation = IssueRelation.new(:relation_type => 'relates')
|
||
|
relation.issue_from = r
|
||
|
relation.issue_to = issue
|
||
|
relation.save
|
||
|
end
|
||
|
else
|
||
|
unsaved_issue_ids << issue.id
|
||
|
end
|
||
| app/views/issue_moves/new.rhtml Wed Feb 09 14:38:39 2011 +0600 → app/views/issue_moves/new.rhtml Wed Feb 09 16:41:53 2011 +0600 | ||
|---|---|---|
|
<label><%= l(:field_due_date) %></label>
|
||
|
<%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
|
||
|
</p>
|
||
|
<% if @copy %>
|
||
|
<p>
|
||
|
<label><%= l(:label_create_related) %></label>
|
||
|
<%= check_box_tag 'create_related', '1', true %>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
</fieldset>
|
||
| config/locales/en.yml Wed Feb 09 14:38:39 2011 +0600 → config/locales/en.yml Wed Feb 09 16:41:53 2011 +0600 | ||
|---|---|---|
|
label_project_copy_notifications: Send email notifications during the project copy
|
||
|
label_principal_search: "Search for user or group:"
|
||
|
label_user_search: "Search for user:"
|
||
|
label_create_related: Make target ticket related to source one
|
||
|
|
||
|
button_login: Login
|
||
|
button_submit: Submit
|
||
- « Previous
- 1
- 2
- Next »