Project

General

Profile

Defect #33610 » fix-33610.patch

Katsuya HIDAKA, 2026-01-29 05:31

View differences:

app/models/issue.rb
2020 2020
  # Make sure updated_on is updated when adding a note and set updated_on now
2021 2021
  # so we can set closed_on with the same value on closing
2022 2022
  def force_updated_on_change
2023
    if @current_journal || changed?
2023
    if changed? || (@current_journal && !@current_journal.notes_and_details_empty?)
2024 2024
      self.updated_on = current_time_from_proper_timezone
2025 2025
      if new_record?
2026 2026
        self.created_on = updated_on
app/models/journal.rb
102 102
  def save(*args)
103 103
    journalize_changes
104 104
    # Do not save an empty journal
105
    (details.empty? && notes.blank?) ? false : super()
105
    notes_and_details_empty? ? false : super()
106
  end
107

  
108
  def notes_and_details_empty?
109
    notes.blank? && details.empty?
106 110
  end
107 111

  
108 112
  def journalized
(2-2/2)