•  
     
    story #12458 DnD on an existing file creates a new version
Summary
Empty
DnD on an existing file creates a new version
Empty
  • User can not create a new version if he drops more than one file.
    • For instance, I have two exiting files in Tuleap: File A and File B
    • On my user computer I have two files: File B and File C
    • => the drag and drop of B & C will be refused. Dropping won't be accepted.
  • If user tries to perform the action and is not authorized (Someone locked the file after page load, he does not have admin permission of folder after a permission update) then an error will be displayed.
  • There is a spinner displayed until the file is totally uploaded.
  • When another user tries to download a document that has a new version currently uploading, the user downloads the last complete version of the document (and not the currently uploading one).
  • The document version creation is not displayed in history until the upload is not finished with success.
  • If there is an existing approval table on the file, an error is displayed, and the link to the corresponding approval table is shown to the user.
  • There is an error if a user tries to create a version when an other user is already creating a new version of the same file.
  • If the document is locked by the user who is dropping himself, then when we upload a new version of the file, it creates a new version, and the lock is kept on the new version.
  • Given I have a file a.txt in my docman, when I drop B.txt on a.txt, then it creates a new version of a.txt, content of b.txt will replace existing content (same behaviour as now)

To do this we use a new REST route PATCH docman_files/:id

 

if two uploads are launched in the same time then user shoud have a conflit

Empty
Empty
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#12458
Marie Ange Garnier (marieange)
2019-02-27 14:29
2018-10-26 16:04
4084

References
Referencing story #12458

Git commit

tuleap/tuleap/stable

Display a drop zone on files 7ee63c9029
Error when file is locked for edition by another user 91a0634e97
Error when file has an approbation table 110719b307
REST route for PATCH files rejects document with table approval 9bde22bb1c
Patch route throws Exception if item is locked by an other user 3a2339f12d
User should not be able to push oversize file a16dd4e804
Create and store new version for updating item 9e48ae2018
In vue modal add a link to directly go on the approval table of document bd1fee02af
PATCH route should only be possible for files c0d884d654
user can't create a new version if there is already an on going version upload ac2cb8c68c
Move PATCH route under docman_files/id route f06717ff41
Store the new version on file system 1a4959384a
Remove empty tlp-dropdown div causing misalignment when uploading file 9d31e6122e
Create the new version in db and preserve the lock 0eefac3275
Random item MUST NOT be deleted if the copy of the uploaded file for a version fails 76f21321c7
Implements canceler 122ced2931
Do not remove random item when upload is finished b50b2dddf8
Clean content after upload b03ef3f65c
Add index on item_id 0110b2a5c8
Lock document is kept by user at upload c0b199d297
drag and drop on UI 43e7ff05fa
image preview is not refreshed after document upload f9f7b0356c
Update event are never sent f5e02414b5
User should be able to abort new version upload a01beebc98
Remove dropzone on files 46299f5276
Last update date of item is not updated 59968471a2
Office documents should be correctly detected when the file is uploaded from the new UI d380336505
Filename should be the uploaded one so download will be consistent 7335b1cebc
Creating two versions of a docman file within the same second via the REST API generates a crash 3ca3abe983
Drag and drop a new version should update global progressbar 3f431958e2

Follow-ups

User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes