プロジェクト

全般

プロフィール

Vote #71399

完了

Copy wiki attachments on project copy

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Projects_11
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
11
version_id:
99
issue_org_id:
10282
author_id:
49304
assigned_to_id:
332
comments:
9
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.

@Mizuki, could you update the test code?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Committed. Thank you for improving Redmine.
--------------------------------------------------------------------------------


related_issues

relates,Closed,26622,Copy version attachments (i.e. Files) along with the versions on project copy

Admin Redmine さんが約4年前に更新

  • カテゴリProjects_11 にセット
  • 対象バージョン4.0.0_99 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0