Move update comment to attachment field
so that it is not hidden when issue description is long.
This commit is contained in:
@@ -159,16 +159,6 @@ class Messenger
|
||||
def attachment_text_from_journal(journal)
|
||||
obj = journal.details.detect { |j| j.prop_key == 'description' && j.property == 'attr' }
|
||||
text = obj.value if obj.present?
|
||||
|
||||
if journal.notes.present?
|
||||
if text.present?
|
||||
text << "\n\n*#{l :label_comment}*\n"
|
||||
text << journal.notes
|
||||
else
|
||||
text = journal.notes
|
||||
end
|
||||
end
|
||||
|
||||
text.present? ? markup_format(text) : nil
|
||||
end
|
||||
|
||||
|
||||
@@ -88,6 +88,11 @@ module RedmineMessenger
|
||||
end
|
||||
|
||||
fields = current_journal.details.map { |d| Messenger.detail_to_field(d, project) }
|
||||
if current_journal.notes.present?
|
||||
fields << { title: I18n.t(:label_comment),
|
||||
value: Messenger.markup_format(current_journal.notes),
|
||||
short: false }
|
||||
end
|
||||
fields << { title: I18n.t(:field_is_private), short: true } if current_journal.private_notes?
|
||||
fields.compact!
|
||||
attachment[:fields] = fields if fields.any?
|
||||
|
||||
Reference in New Issue
Block a user