Overview
The feature is provided is the Document plugin is active.
At this level of implemenation:
- Only 1 folder (no other types of documents) can be associated with an artifact
- A folder can be associated with only one artifact
- Select of the folder is done with done with it's ID
Functional overview
You can checkout a live mock-up to better feel the feature.
Creation / link
The association is meant to be done in the Artifact via an "Action menu" option (mock-up to be done):
With the Following behaviours:
Create new will
- pop-up a modal window that allow to select a parent folder (within the current project) where the new document will be created
- then either (to be checked with Dev & UX team)
- Option 1
- redirect to the Document service to proceed to creation of Folder
- redirect to the Artifact after creation
- Option 2
- Displays the Folder creation modale within the Aritfact view
- and then reload the artifact page
Link with existing will
- Allow to select a folder in the Document service with folder ID
Display
In Artifact view
When an artifact is linked to a document, the link appears in the tab view as it's done for (file releases ATM).
In Document view
Management of deletions
We need to take into account deletes. With special case of delete in docman that can ce reverted (folder restored).
On delete of folder the link is no longer displayed.
- if the folder is restored, the link is displayed again
- if someone links the artifact to another folder while the 1st one is deleted-not-yet-purged, if the deleted-not-yet-purged folder is restored, the link is not restored (the artifact is now attached to a different folder)
- at document purge, if the folder is still associated to the artifact, the link is purged too.
If the artifact is deleted, the link is purged
Access rights
In order to link an artifact with a folder, a user must have:
- "canWrite" permission on folder
- "canAccess" (read) permission to the artifact
XML import/exported
As docmant is not part of standard XML/Import, the link cannot be imported nor exported.
Technical overview
The feature must be provided by a new Plugin (Tuleap Enterprise) that bridges Document & Trackers. This plugin will be responsible of
- storing the link between one artifact and one folder.
- providing the REST API to manipulate this link: OPTIONS, GET, POST & DELETE
- a VueJS app to manage the creation and/or link from artifact view (hook in action menu + in artifact view JS)
- + 2 VueJS component that should be dynamically loaded by Document app to provide the integration.
The ability for Document app to dynamically load components provided by a 3rd party plugin seems possible according to the spec but a quick spike should be done to ensure it works as expected.
In addition to that, the following views need to be modified to take into account the new tab:
- Agile Dashboard Milestone details
- Agile Dashboard Planning
- Agile Dashboard Cardwall
- Artifact view
- FRS release view
Story Split
- Link with existing folder with it's ID and display in Artifact view
- New entry in action menu
- New app to manage the modale & the creation
- Manage permission for linking
- New tracker_document plugin for storage of the link with 2 routes: POST & DELETE
- Display of the link in Artifact view
- Management of delete of artifact or folder
- Display in Document view
- Display the tabs (Document, Artifact, FRS, ...) in Document view (display of tabs might a a builtin feature of docman or dynamic-loaded feature provided by the plugin).
- Display the link to artifact (and only artifact) in the folder "Quick View"
- Implement GET of link between document & artifact
- Display & check permission of tabs in all services (Document, Artifact, FRS, AgileDasbhoard)
- Impelement a new GET route to fetch all linked resources.
- Link with existing folder with a folder selector
- TBD
- Link + Create a new folder
- TBD