Content
View differences
Updated by Niels Lindenthal over 4 years ago
**As an** OpenProject user
**I want to** be able to associate relevant files I have on Nextcloud with work packages
**so that I**
* have all the relevant attachments concerning the work package,
* can be confident about having the latest version of the file(s),
* be confident that any updates to relevant files will not require manual relinking,
* I can associate the the same file(s) with several work packages with making additional copies.
* I can update the relevant file(s) on Nextcloud and know that the workpackage will still point to the right file(s) with all my updates.
##
## Example use cases
* There is a complex calculation that needs to be done in a spreadsheet tool. The work package describes the workflow to work on a specific part of that (eg. energy projections for a construction project). Other people are working on other parts, but it's important for everybody to have access to the same latest version (including the work of other people).
* Preparing slides for a workshop. Several users need to work collaboratively on different sections. This is easier if everyone is working on a single file to avoid version conflicts and facilitate collaboration.
* Creating a new quote. This requires input from contractors to specific files.
##
## Implementation considerations
1. Extend the data model in OpenProject to store certain information about files hosted in Nextcloud:
* ID
* Link
* Name
* File Type (and corresponding icon, if possible)
2. Expose this information with in an additional work package filter (API) API that can
1. Return a list of all files linked to a particular work package
2. Return a list of all work packages linked to a single file (this information will be displayed/accessed on Nextcloud)
3. Add a"Nextcloud" tab to work package split screen (described more in detail below) that allows the user to access linked files. This tab should allow the user to:
1. Add file(s) as links
2. Remove each link (manually)
3. Download the file locally
4. Access the file in Nextcloud (in a new tab)
5. Log in to Nextcloud if the user is not connected
4. Make these linked files visible under the "Files" section of a work package full screen view
5. Authentication and authorisation (OIDC)
6. Log in screen and file picker (to access the Nextcloud folder hierarchy via the split screen)
##
## The Nextcloud tab
For the Nextcloud tab to appear in the work package split screen, the bridge between OpenProject and Nextcloud should already have been established in settings. The precise interface to do has yet to be described, but for now it involves sharing the API access token with the OpenProject app in Nextcloud.
The following assumes that the link has already been made.
The Nextcloud tab appears right to "Watchers" and left to Github. after "Watchers". Clicking on it with display an empty screen with two buttons:
* Link file(s)
* Settings
_Note that this split screen view is naturally also available in split screen view accessed via a work package list._
**Link file(s)**
Clicking on this button has two possible behaviours:
* If the user is not logged in to Nextcloud, then a login dialogue is displayed (with the username/email field; a password field; a "forgot passsword?" link and the "Log in to Nextcloud" button)
* If the user is logged in, a file-picker dialogue is displayed
The file picker allows the user to navigate through the folders on Nextcloud visible to OpenProject. By default (and by design in the first first iteration), this will be everything under the "OpenProject" folder under home that was created at the moment the two accounts were linked.
The user is then free to navigate through the folder hierarchy to locate files to link. They may either select a single file or multiple files to link by clicking on the corresponding checkbox(es) next to the file name(s) and then clicking on the primary "Link Selected" button. This button remains disabled until at least one file is selected.
The linked files then show up in the file list below where the "Link file(s)" and Settings buttons are.
**File list**
The upper half of the area below the buttons represents the file list. The file list contains a list of all files that are linked with a work package, displayed in alphabetical order.
Each item in the file list is a linked file, with these elements in single line:
* An icon representing file type (acquired from Nextcloud, else we can provide a generic file icon)
* The file name
* The file size
* Download button (direct link to the file)
* View in Nextcloud button (opens in a new tab)
* A more icon with, for the moment, only one item
* Remove link
**Activity stream**
The lower half, below the the file list, represents the activity stream. This will contain:
* Activity related to the file (creation, modification, comments) and
* Comments posted directly on Nextcloud
A Nextcloud icon next to the user icon indicates to the user that these elements correspond to activity on Nextcloud and not activity on the work package.
**Settings button**
_A description of the behaviour of the Settings button will subsequently be added._
##
## Nextcloud elements in the Activity tab
_To be defined..._
##
## Out of scope
* Linking of folders.
* Setting permissions in Nextcloud.
* Direct file upload in OpenProject
## Visuals
_An empty Nextcloud tab in a work package split screen view_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/23998/content"></div></figure>
_A dialogue inviting the user to log in to Nextcloud to be able to access the file picker_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/23999/content"></div></figure>
_The file picker allows the user to traverse the folder hierarchy to locate files to link with the current work package_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/24000/content"></div></figure>
_Each file in the file list has action buttons to download or view in Nextcloud, and a more button_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/24001/content"></div></figure>
## Figma link
The Figma prototype associated with this work package is available here:
[https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/?node-id=64%3A16362](https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/?node-id=64%3A16362)
_(Please ensure that the "NextCloud in OP Integration (basic)" page is selected in the top-left page list)_
**I want to** be able to associate relevant files I have on Nextcloud with work packages
**so that I**
* have all the relevant attachments concerning the work package,
* can be confident about having the latest version of the file(s),
* be confident that any updates to relevant files will not require manual relinking,
* I can associate the the same file(s) with several work packages with making additional copies.
* I can update the relevant file(s) on Nextcloud and know that the workpackage will still point to the right file(s) with all my updates.
##
## Example use cases
* There is a complex calculation that needs to be done in a spreadsheet tool. The work package describes the workflow to work on a specific part of that (eg. energy projections for a construction project). Other people are working on other parts, but it's important for everybody to have access to the same latest version (including the work of other people).
* Preparing slides for a workshop. Several users need to work collaboratively on different sections. This is easier if everyone is working on a single file to avoid version conflicts and facilitate collaboration.
* Creating a new quote. This requires input from contractors to specific files.
##
## Implementation considerations
1. Extend the data model in OpenProject to store certain information about files hosted in Nextcloud:
* ID
* Link
* Name
* File Type (and corresponding icon, if possible)
2. Expose this information with
1. Return a list of all files linked to a particular work package
2. Return a list of all work packages linked to a single file (this information will be displayed/accessed on Nextcloud)
3. Add a"Nextcloud" tab to work package split screen (described more in detail below) that allows the user to access linked files. This tab should allow the user to:
1. Add file(s) as links
2. Remove each link (manually)
3. Download the file locally
4. Access the file in Nextcloud (in a new tab)
5. Log in to Nextcloud if the user is not connected
4. Make these linked files visible under the "Files" section of a work package full screen view
5. Authentication and authorisation (OIDC)
6. Log in screen and file picker (to access the Nextcloud folder hierarchy via the split screen)
##
##
For the Nextcloud tab to appear in the work package split screen, the bridge between OpenProject and Nextcloud should already have been established in settings. The precise interface to do has yet to be described, but for now it involves sharing the API access token with the OpenProject app in Nextcloud.
The following assumes that the link has already been made.
The Nextcloud tab appears right to "Watchers" and left to Github.
* Link file(s)
* Settings
_Note that this split screen view is naturally also available in split screen view accessed via a work package list._
**Link file(s)**
Clicking on this button has two possible behaviours:
* If the user is not logged in to Nextcloud, then a login dialogue is displayed (with the username/email field; a password field; a "forgot passsword?" link and the "Log in to Nextcloud" button)
* If the user is logged in, a file-picker dialogue is displayed
The file picker allows the user to navigate through the folders on Nextcloud visible to OpenProject. By default (and by design in the first first iteration), this will be everything under the "OpenProject" folder under home that was created at the moment the two accounts were linked.
The user is then free to navigate through the folder hierarchy to locate files to link. They may either select a single file or multiple files to link by clicking on the corresponding checkbox(es) next to the file name(s) and then clicking on the primary "Link Selected" button. This button remains disabled until at least one file is selected.
The linked files then show up in the file list below where the "Link file(s)" and Settings buttons are.
**File list**
The upper half of the area below the buttons represents the file list. The file list contains a list of all files that are linked with a work package, displayed in alphabetical order.
Each item in the file list is a linked file, with these elements in single line:
* An icon representing file type (acquired from Nextcloud, else we can provide a generic file icon)
* The file name
* The file size
* Download button (direct link to the file)
* View in Nextcloud button (opens in a new tab)
* A more icon with, for the moment, only one item
* Remove link
**Activity stream**
The lower half, below the the file list, represents the activity stream. This will contain:
* Activity related to the file (creation, modification, comments) and
* Comments posted directly on Nextcloud
A Nextcloud icon next to the user icon indicates to the user that these elements correspond to activity on Nextcloud and not activity on the work package.
**Settings button**
_A description of the behaviour of the Settings button will subsequently be added._
##
## Nextcloud elements in the Activity tab
_To be defined..._
##
## Out of scope
* Linking of folders.
* Setting permissions in Nextcloud.
* Direct file upload in OpenProject
## Visuals
_An empty Nextcloud tab in a work package split screen view_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/23998/content"></div></figure>
_A dialogue inviting the user to log in to Nextcloud to be able to access the file picker_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/23999/content"></div></figure>
_The file picker allows the user to traverse the folder hierarchy to locate files to link with the current work package_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/24000/content"></div></figure>
_Each file in the file list has action buttons to download or view in Nextcloud, and a more button_
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/24001/content"></div></figure>
## Figma link
The Figma prototype associated with this work package is available here:
[https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/?node-id=64%3A16362](https://www.figma.com/file/gtLQfPe09X7XugAH8L7dTy/?node-id=64%3A16362)
_(Please ensure that the "NextCloud in OP Integration (basic)" page is selected in the top-left page list)_