•  
     
    story #12456 Cut/Copy/paste items
Summary
Empty
Cut/Copy/paste items
Empty
  • Copying or cutting a document stores it in a way that is persisted after a page refresh and shared between browser tabs
  • On dropdowns, if user has a document currently cut/copied then its name is displayed under the paste action (see live mockup)
    For example: given I'm copying file.txt, then in dropdown option, there will be
    Paste
    |__ file.txt
  • The paste action is disabled by front end opportunistically, if can determine the document can not be pasted the paste action is disabled with a info message. Potential cases where the paste is disabled:
    • same name
    • folder into itself or descendant
    • ...
  • If a user tries to cut and paste an item in a folder but another item has already the same name in it, pasting is not allowed (i.e. the same rule than the creation applies)
  • If a user tries to copy and paste an item in a folder but another item has already the same name in it, the document name is prefixed by "Copy of"
  • As of today, when we copy/cut/paste a document, we are redirected to an intermediate page that allows the user to choose the position of item. This page is not needed anymore (because item order is Folders first, then lexicographic).
  • cut adds an entry in the document history (as of today)
Empty
Status
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?

The Copy/Paste action is represented as a single POST /docman_folders/{id}/{type} call:

{
  "copy": {
    "item_id": 
  }
}

For each route, you either pass the usual creation representation or this "copy from" representation.

 

The Cut/Paste action is represented as a single PATCH /docman_{type}/{id} call:

{
  "move": {
    "item_id": 
  }
}
Details
#12456
Marie Ange Garnier (marieange)
2019-07-24 14:30
2018-10-26 15:54
3804

References
Referencing story #12456

Git commit

tuleap/tuleap/stable

Follow-ups