raise UnauthorizedAction unless user.allowed_to?(:add_issue_notes, issue.project) || user.allowed_to?(:edit_issues, issue.project)
end
+ # ignore CLI-supplied defaults for new issues
+ @@handler_options[:issue].clear
+
journal = issue.init_journal(user, cleaned_up_text_body)
issue.safe_attributes = issue_attributes_from_keywords(issue)
issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)}
assert_equal 1, ActionMailer::Base.deliveries.size
end
+ def test_add_issue_note_should_not_set_defaults
+ journal = submit_email('ticket_reply.eml', :issue => {:tracker => 'Support request', :priority => 'High'})
+ assert journal.is_a?(Journal)
+ assert_match /This is reply/, journal.notes
+ assert_equal 'Feature request', journal.issue.tracker.name
+ assert_equal 'Normal', journal.issue.priority.name
+ end
+
def test_reply_to_a_message
m = submit_email('message_reply.eml')
assert m.is_a?(Message)