|
|
|
@@ -228,11 +228,11 @@ class Issue < ApplicationRecord |
|
|
|
att_ids += self.description.to_s.scan(/\/api\/attachments\/.+\"/).map{|s|s.match(/\d+/)[0]} |
|
|
|
att_ids += self.description.to_s.scan(/\/api\/attachments\/\d+/).map{|s|s.match(/\d+/)[0]} |
|
|
|
if att_ids.present? |
|
|
|
Attachment.where(id: att_ids).where(container_type: nil).update_all(container_id: self.id, container_type: self.class.name) |
|
|
|
Attachment.where(id: att_ids).where("container_type IS NULL OR container_type = 'Issue'").update_all(container_id: self.project_id, container_type: "Project") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def to_builder |
|
|
|
def to_builder |
|
|
|
Jbuilder.new do |issue| |
|
|
|
issue.(self, :id, :project_issues_index, :subject, :description, :branch_name, :start_date, :due_date) |
|
|
|
issue.created_at self.created_on.strftime("%Y-%m-%d %H:%M") |
|
|
|
|