Project

General

Profile

Actions

Feature #10282

closed

Copy wiki attachments on project copy

Added by Jorge Vila almost 13 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Projects
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

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.


Files

add_wiki_attachments_to_copy.patch (1.63 KB) add_wiki_attachments_to_copy.patch Mizuki ISHIKAWA, 2018-01-19 07:38

Related issues

Related to Redmine - Patch #26622: Copy version attachments (i.e. Files) along with the versions on project copyClosedGo MAEDA

Actions
Actions #1

Updated by Jean-Philippe Lang over 12 years ago

  • Tracker changed from Defect to Feature
  • Subject changed from Attachment permission when copying projects to Copy wiki attachments on project copy
  • Category set to Projects
Actions #2

Updated by Go MAEDA almost 7 years ago

  • Related to Patch #26622: Copy version attachments (i.e. Files) along with the versions on project copy added
Actions #3

Updated by Go MAEDA almost 7 years ago

  • Target version set to Candidate for next major release
Actions #4

Updated by Mizuki ISHIKAWA almost 7 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.

Actions #5

Updated by Go MAEDA almost 7 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.

Actions #6

Updated by Go MAEDA almost 7 years ago

  • Target version changed from Candidate for next major release to 4.1.0

As I wrote in the previous note, copying Wiki without attachments breaks wiki page's appearance. This patch can prevent such problems.

Setting target version to 4.1.0.

Actions #7

Updated by Go MAEDA over 6 years ago

I think the test code should also check digest and disk_filename attributes to ensure that both attachments are identical and point to the same physical file.

汪婷 汪, could you update the test code?

Actions #8

Updated by Go MAEDA over 6 years ago

Go MAEDA wrote:

I think the test code should also check digest and disk_filename attributes 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.

Actions #9

Updated by Go MAEDA over 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0
  • Resolution set to Fixed

Committed. Thank you for improving Redmine.

Actions

Also available in: Atom PDF