Content
View differences
Updated by Wieland Lindenthal about 4 years ago
### Use cases:
* List files that belong to a work package packages in a separate "Files" tab. tab of a work package.
* The tab lists all conventional work package attachments in one section, and
* in another section it lists all links "file links" to related files that reside within an external _file storage_. We call these links _file links._ In the first implementation a _file storage_ "file storage" (A specific Nextcloud instance is such a specific Nextcloud instance. "file storage")
* The tab shows a number indicating the amount of files (attachments + file links) in the tab handle, similar to the "Watchers" tab.
* On each listed _file link_
* A click on the Quick access buttons or menu entries per file name opens the file (opens file in Nextcloud file editor/viewer) for
* A _download_ button will start downloading file to hard drive (can be deactivated per storage in admin settings)
* A _folder_ button will open the Open file (opens file in Nextcloud file editor/viewer)
* Show file in its location (opens the directory in Nextcloud where the file is located)
* Delete file link (removes the link but does not delete the file)
* Show meta information per file
* File type _(PDF, JPG,_ etc.)
* File size (_2.8 MB_)
* Last modified time stamp
* Last modified by (name) if available through Nextcloud API
* Created by (name) if available through Nextcloud API
* Owner (name) if available through Nextcloud API
* Path if feasible (a shared file can have multiple paths)
* Create a link between a work package and an existing file in Nextcloud.
* Clicking a button in the "Files" tab will show a file picker with the Nextcloud file structure for that user (Keep in mind that every (Every Nextcloud user has a different file structure)
* To achieve this, the current OpenProject user will need to request authorization from Nextcloud via OAuth, so that OpenProject consequently can make personalized API requests to Nextcloud.
* Upload a file from within a work package in OpenProject
* Chose a OpenProject, chose location in Nextcloud via a _location picker_
* Save Nextcloud, save the file in Nextcloud Nextcloud, create link
* Create a _file link_ between the work packageĀ
* **Out of scope:** Upload of entire directories, as normal Form uploads do not allow this. So only the upload of individual files will be supported in the first version. supported.
* Delete _file links_ file links from a work package (without deleting it in Nextcloud).
### Implementation blocks:
* Files tab in for work packages.
* OAuth reverse direction (authorize OpenProject users in Nextcloud) with refreshing mechanism.
* File picker for selecting link targets (files and directories). Queries Nextcloud with the user's access token (probably via WebDAV). WEBDAV.
* Location picker for upload targets (a target is always a directory). Queries Nextcloud with the user's access token (probably via WebDAV). WEBDAV.
* If possible, direct upload of files to Nextcloud without tunneling through OpenProject server. This requires some sort of one-time upload tokens, which can get exposed to the OpenProject frontend. Fallback could be tunneling all uploaded files through OpenProject.
* Remove file links from OpenProject when files get deleted in Nextcloud (either some sort of callback triggered by Nextcloud or through polling when user opens the _Files_ tab). some periodic polling).
### Implementation decisions: Open technical questions:
* The What file name do we present in OpenProject is the name of the file that the file's owner sees. Apparently in show? In Nextcloud a file apparently can have multiple names and paths every time a file gets shared. To have a "canonical" name for all OpenProject users we will always show paths. It is not clear which is the file name that the file's owner sees. _canonical_ name. Needs to get clarified soon.
* OpenProject updates How do we know when to update the "cached" cached file name in OpenProject when a user open the _Files_ tab. OpenProject?
### Out of scope:
* Syncing of access rights to the files in Nextcloud according to the roles and privileges of members in a OpenProject project. This would require two things
* OpenProject is somehow owning directories and files and can share them with (read or read/write permissions with other Nextcloud users).
* All users and groups are in sync between OpenProject and Nextcloud. It seems a good idea to use LDAP as the single source of truth. However, the timing, when all users and groups have completed syncing with both systems, OpenProject and Nextcloud, does not seem trivial.
* Linking between a OpenProject project (instead of work packages) and files in Nextcloud. That is feasible and intended to built in a later stage. The outlook could be a possible replacement for the current "Documents" module.
### Wire frames (to sketch the idea. Not final design)
Listing attachments and file links in a separate :work package tab
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29264/content"></div></figure>
Linked file's meta data
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29263/content"></div></figure>
Uploading files via drag'n drop (early concept sketch)
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29265/content"></div></figure>
File picker
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29266/content"></div></figure>
* List files that belong to a work package
* The tab lists all conventional work package attachments in one section, and
* in another section it lists all links
* The tab shows a number indicating the amount of files (attachments + file links) in the tab handle, similar to the "Watchers" tab.
* On each listed _file link_
* A click on the
* A _download_ button will start downloading file to hard drive (can be deactivated per storage in admin settings)
* A _folder_ button will open the
* Show file in
* Delete file link (removes the link but does not delete the file)
* Show meta information per file
* File type _(PDF, JPG,_ etc.)
* File size (_2.8 MB_)
* Last modified time stamp
* Last modified by (name) if available through Nextcloud API
* Created by (name) if available through Nextcloud API
* Owner (name) if available through Nextcloud API
* Path if feasible (a shared file can have multiple paths)
* Create a link between a work package and an existing file in Nextcloud.
* Clicking a button in the "Files" tab will show a file picker with the Nextcloud file structure for that user (Keep in mind that every
* To achieve this, the current OpenProject user will need to request authorization from Nextcloud via OAuth, so that OpenProject consequently can make personalized API requests to Nextcloud.
* Upload a file from within a work package in OpenProject
* Chose a
* Save
* Create a _file link_ between the work packageĀ
* **Out of scope:** Upload of entire directories, as normal Form uploads do not allow this. So only the upload of individual files will be supported in the first version.
* Delete _file links_
### Implementation blocks:
* Files tab in for work packages.
* OAuth reverse direction (authorize OpenProject users in Nextcloud) with refreshing mechanism.
* File picker for selecting link targets (files and directories). Queries Nextcloud with the user's access token (probably via WebDAV).
* Location picker for upload targets (a target is always a directory). Queries Nextcloud with the user's access token (probably via WebDAV).
* If possible, direct upload of files to Nextcloud without tunneling through OpenProject server. This requires some sort of one-time upload tokens, which can get exposed to the OpenProject frontend. Fallback could be tunneling all uploaded files through OpenProject.
* Remove file links from OpenProject when files get deleted in Nextcloud (either some sort of callback triggered by Nextcloud or through polling when user opens the _Files_ tab).
### Implementation decisions:
* The
* OpenProject updates
### Out of scope:
* Syncing of access rights to the files in Nextcloud according to the roles and privileges of members in a OpenProject project. This would require two things
* OpenProject is somehow owning directories and files and can share them with (read or read/write permissions with other Nextcloud users).
* All users and groups are in sync between OpenProject and Nextcloud. It seems a good idea to use LDAP as the single source of truth. However, the timing, when all users and groups have completed syncing with both systems, OpenProject and Nextcloud, does not seem trivial.
* Linking between a OpenProject project (instead of work packages) and files in Nextcloud. That is feasible and intended to built in a later stage. The outlook could be a possible replacement for the current "Documents" module.
### Wire frames (to sketch the idea. Not final design)
Listing attachments and file links in a separate :work package tab
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29264/content"></div></figure>
Linked file's meta data
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29263/content"></div></figure>
Uploading files via drag'n drop (early concept sketch)
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29265/content"></div></figure>
File picker
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/29266/content"></div></figure>