Overview
It should be possible to drag'n drop and/or copy & paste images in all text areas of a tracker:
- Text fields (like descriptions, etc)
- Follow-up comments
This is only possible when those area are in "HTML" mode with an active ckeditor. Files are stored as attachments.
Acceptance criteria
Conditions that apply to be able to upload:
- There must be at least one "attachment" field in the tracker definition (if there are several attachment fields in the definition, we take the first that match permissions constraints)
- This field must be writeable by the user (permissions allow it and it's not read only by workflow)
- Uploads respects the configured "max upload size"
Otherwise, users that attempt to dn'd images in the textare will get an error message and upload will fail.
Then when user drop an image, it's automatically uploaded on the server as a new attachment and associated to the artifact at submit. The created attachment as a readable url like /plugins/tracker/attachment/155-slugified-title.png
At artifact creation/update
When a user compose a new artifact with dn'd images but doesn't submit the artifact, the uploaded files must be cleaned eventually.
There is a garbage collection done with system events (SYSTEM_CHECK ?)
Limitations
Dn'd is not allowed
- During artifact copy
- During mass-change
Dn'd is possible in
- Artifact view
- Angular Modal (Kanban, TTM, Planning view)
Dn'd might be possible in
- Modal v1 (aka "Lightwindow"): the modal window you get when you create or attach an existing artifact in Artifact view
- Modal v2 (aka "Les Oreilles"): the modal window you get on Scrum Cardwall and Agile Dashboard home
"might be possible" means that it's attempted to be done in best effort mode but we might be unable to do it within the estimation scope (might need a dedicated story afterward).
Technical overview
This leverages the ckeditor upgrade (request #12694) as well as ckeditor uploadimage plugin.