modules/bcf/lib/open_project/bcf/bcf_xml/issue_writer.rb
def comments(xml)
      comments = issue.comments.group_by(&:journal_id)
      work_package.journals.select(:id, :notes, :user_id, :created_at).map do |journal|
        next if journal.notes.empty?

        # Create BCF comment reference for the journal
        comment = comments[journal.id]&.first || issue.comments.build(issue_id: issue, journal_id: journal.id)
        comment_node xml, comment.uuid, journal
      end
    end
##
# Render the comments of the work package as XML nodes
Render the comments of the work package as XML nodes
Render the comments of the work package as XML nodes
def comments(xml)
      comments = issue.comments.group_by(&:journal_id)
      work_package.journals.select(:id, :notes, :user_id, :created_at).map do |journal|
        next if journal.notes.empty?
        comment = comments[journal.id]&.first || issue.comments.build(issue_id: issue, journal_id: journal.id)
        comment_node xml, comment.uuid, journal
      end
    end
def comments ( xml ) comments = issue . comments . group_by ( & :journal_id ) work_package . journals . select ( :id , :notes , :user_id , :created_at ) . map do | journal | next if journal . notes . empty? comment = comments [ journal . id ] &. first || issue . comments . build ( issue_id : issue , journal_id : journal . id ) comment_node xml , comment . uuid , journal end end
Render the comments of the work package as XML nodes
Render the comments of the work package as XML nodes
# Create BCF comment reference for the journal
xml