Failure to Update DMSF from 1.5.9 to 2.0.0 during migrate
This commit is contained in:
parent
dda3ae437b
commit
75c253453e
@ -44,12 +44,16 @@ class DmsfFileContainerRollback < ActiveRecord::Migration[4.2]
|
|||||||
new_folder_ids << parent.id
|
new_folder_ids << parent.id
|
||||||
end
|
end
|
||||||
# Issue folder
|
# Issue folder
|
||||||
folder = DmsfFolder.new
|
title = "#{issue.id} - #{DmsfFolder.get_valid_title(issue.subject)}"
|
||||||
folder.project_id = issue.project.id
|
folder = DmsfFolder.find_by(project_id: issue.project.id, dmsf_folder_id: parent.id, title: title)
|
||||||
folder.dmsf_folder_id = parent.id
|
unless folder
|
||||||
folder.title = "#{issue.id} - #{DmsfFolder.get_valid_title(issue.subject)}"
|
folder = DmsfFolder.new
|
||||||
folder.user_id = User.anonymous.id
|
folder.project_id = issue.project.id
|
||||||
folder.save!
|
folder.dmsf_folder_id = parent.id
|
||||||
|
folder.title = "#{issue.id} - #{DmsfFolder.get_valid_title(issue.subject)}"
|
||||||
|
folder.user_id = User.anonymous.id
|
||||||
|
folder.save!
|
||||||
|
end
|
||||||
new_folder_ids << folder.id
|
new_folder_ids << folder.id
|
||||||
# Move the file into the new folder
|
# Move the file into the new folder
|
||||||
file.dmsf_folder_id = folder.id
|
file.dmsf_folder_id = folder.id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user