modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
def build_comments
      extractor.comments.each do |data|
        next if issue.comments.has_uuid?(data[:uuid]) # Comment has already been imported once.

        comment = issue.comments.build data.slice(:uuid)

        # Cannot link to a journal when no work package
        next if issue.work_package.nil?

        author = get_comment_author(data)

        call = create_comment(author, data[:comment])

        if call.success?
          comment.journal = call.result
        else
          Rails.logger.error "Failed to create comment for BCF #{issue.uuid}: #{call.errors.full_messages.join('; ')}"
        end
      end
    end
##
# Extend comments with new or updated values from XML
Extend comments with new or updated values from XML
Extend comments with new or updated values from XML
def build_comments
      extractor.comments.each do |data|
        next if issue.comments.has_uuid?(data[:uuid]) 
        comment = issue.comments.build data.slice(:uuid)
        next if issue.work_package.nil?
        author = get_comment_author(data)
        call = create_comment(author, data[:comment])
        if call.success?
          comment.journal = call.result
        else
          Rails.logger.error "Failed to create comment for BCF #{issue.uuid}: #{call.errors.full_messages.join('; ')}"
        end
      end
    end
def build_comments extractor . comments . each do | data | next if issue . comments . has_uuid? ( data [ :uuid ] ) comment = issue . comments . build data . slice ( :uuid ) next if issue . work_package . nil? author = get_comment_author ( data ) call = create_comment ( author , data [ :comment ] ) if call . success? comment . journal = call . result else Rails . logger . error "Failed to create comment for BCF #{issue.uuid}: #{call.errors.full_messages.join('; ')}" end end end
Extend comments with new or updated values from XML
Extend comments with new or updated values from XML
# Comment has already been imported once. # Cannot link to a journal when no work package