2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2017-08-28 21:31:26 +00:00
|
|
|
module ClonesTicketArticleAttachments
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def article_attachments_clone(article)
|
|
|
|
raise Exceptions::UnprocessableEntity, 'Need form_id to attach attachments to new form.' if params[:form_id].blank?
|
|
|
|
|
2019-02-10 08:40:55 +00:00
|
|
|
article.clone_attachments('UploadCache', params[:form_id], only_attached_attachments: true)
|
2017-08-28 21:31:26 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|