34302.patch

Yuichi HARADA, 2020-12-10 01:59

Download (1.88 KB)

View differences:

app/helpers/issues_helper.rb
378 378

  
379 379
  def email_issue_attributes(issue, user, html)
380 380
    items = []
381
    %w(author status priority assigned_to category fixed_version start_date due_date).each do |attribute|
381
    %w(author status priority assigned_to category fixed_version start_date due_date parent_issue).each do |attribute|
382 382
      if issue.disabled_core_fields.grep(/^#{attribute}(_id)?$/).empty?
383 383
        attr_value = (issue.send attribute).to_s
384 384
        next if attr_value.blank?
app/models/issue.rb
1447 1447
    end
1448 1448
  end
1449 1449

  
1450
  alias :parent_issue :parent
1451

  
1450 1452
  def set_parent_id
1451 1453
    self.parent_id = parent_issue_id
1452 1454
  end
test/unit/mailer_test.rb
586 586
    ActionMailer::Base.deliveries.clear
587 587
    with_settings :notified_events => %w(issue_added) do
588 588
      cf = IssueCustomField.generate!
589
      issue = Issue.generate!
589
      issue = Issue.generate!(:parent => Issue.find(1))
590 590
      Mailer.deliver_issue_add(issue)
591 591

  
592 592
      assert_not_equal 0, ActionMailer::Base.deliveries.size
......
595 595
      assert_mail_body_match /^\* Author: /, mail
596 596
      assert_mail_body_match /^\* Status: /, mail
597 597
      assert_mail_body_match /^\* Priority: /, mail
598
      assert_mail_body_match /^\* Parent task: /, mail
598 599

  
599 600
      assert_mail_body_no_match /^\* Assignee: /, mail
600 601
      assert_mail_body_no_match /^\* Category: /, mail