# Epic OP-13706 - Copy of template projects including their project folders in SharePoint

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-13706

## Detailed specification

### Motivation and background information

### Acceptance criteria

### Out of scope

| Attribute | Value |
| --- | --- |
| Mockups |  |

## Planning

| Attribute | Value |
| --- | --- |
| Roadmap |  |
| Date |  |
| Votes |  |
| List |  |
| Target versions | 14.0.0 |
| Sprint | 14.0.0 |
| Backlog bucket |  |
| Relevance |  |

## Subitems

| ID | Type | Subject | Status | Assignee | Target versions | Project | Priority | Spent time |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| OP-14216 | Feature | Maintain manually managed project folder on project copy for OneDrive/SharePoint | closed |  | 13.3.0 | OpenProject | Medium |  |
| OP-14240 | Implementation | Copy template folder command for SharePoint | closed |  | 13.4.0 | OpenProject | Medium |  |
| OP-14381 | Implementation | Implement FileIdsDeepQuery for Sharepoint | closed |  | 13.4.0 | OpenProject | Medium |  |
| OP-14150 | Feature | Copy automatically managed project folder on project copy for OneDrive/SharePoint | closed |  | 14.0.0 | OpenProject | Medium |  |
| OP-14424 | Implementation | Introduce a Job to do the Storage Copy related steps. | closed |  | 14.0.0 | OpenProject | Medium |  |
| OP-14425 | Implementation | Send an email when the copying process is finished | closed |  |  | OpenProject | Medium |  |
| OP-14426 | Implementation | Write Journals about the completion of the copy steps | new |  |  | OpenProject | Medium |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Module |
| --- | --- | --- | --- | --- | --- | --- |
| OP-14382 | Code maintenance | Ensure consistent usage of folder_path on a per storage basis | closed |  | 13.4.0 |  |

## Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Enterprise plan |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Marcello Rocha Pereira |
| Product manager |  |
| Designer | Marc Alcobé |
| Developers | OP Dev Titan Team |
| Requested by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |

## Description

# User Problem

## User

  - Project manager

## Problem

When switching between projects it can get very tedious to find files if there is not a common folder structure for all projects of the same kind.

*Example*:

  - Where do you put files related to work packages?
  - Where do you put final version of specifications?
  - Where do you put contracts?
  - Where do you put quotes and invoices?
  - ...

## Pain

Assuming shared project folders (<mention class="mention" data-id="50988" data-type="work_package" data-text="#50988">\#50988</mention>) were implemented.  When setting up a new project with a shared folder a project manager would first need manually(\!) setup a folder structure, similar to the other projects.

  - This is tedious, unnecessary work
  - Error prone as it easy to forget something

## Solution

When setting up projects based on project templates we also allow to setup a default folder structure for its shared project folder.

  - In the project template in OpenProject an admin can link a group folder. This folder serves as the template for a folder and file structure.
  - When creating a new project based on a template the group folder of the project template is copied and linked to the newly created project.

### Acceptance criteria

1.  `Project folder` checkbox is selected during a project copy process.
2.  After the copy is finished we have a copy of the project folder setup in *SharePoint*.
3.  File links that are present in the origin project (the template) and reference a file **inside** the origin project folder do get copied over to the target projects and will link the fresh copy of the file. 
4.  File links that are present in the origin project (the template) and reference a file **outside** the origin project folder will get copied but will reference the original file.
