Copy wiki attachments on project copy
When copying a project to a new project, the Wiki pages are copied, but the attachments are not. The attachments on the wiki pages are linked to the previous project, and if, for example, the users accessing the new project have no access to the original project, the images return a 403 error.
Updated by Mizuki ISHIKAWA about 6 years ago
When you copy a project, Issue is copied together with the attached file.
I think that wiki attachments should be copied just like Issue.
By applying the following patch, you can copy the attached file of the wiki.
Updated by Go MAEDA about 6 years ago
Mizuki, thank you for submitting the patch. I tried out your patch and it works fine for me.
I think it is natural that attachments are copied along with wiki pages. In many cases, the content of Wiki page and its attachments are inseparable because attachments are often used to display inline images on the page. The page does not make sense without those images.
Updated by Go MAEDA almost 6 years ago
Go MAEDA wrote:
I think the test code should also check
disk_filenameattributes to ensure that both attachments are identical and point to the same physical file.
Sorry, you don't have to add such tests because no other tests which copy attachments in test/unit/project_copy_test.rb check those attributes.