Attach Files to a Ticket - Design Story
the design story for attaching files to a ticket.
The basic idea:
- create attachment row to allow user
- slelect files from local desktop
- upload files to server, save as MediaWiki File.
- append file url to description or comment textarea.
- add attachment row on ticket details form
- add new attachment row on comment form
Components
- Mediawiki special page to handle PLupload AJAX request.
- PHP function to render HTML for file selection and upload section (row). It will be used on both ticket details form and comment form.
- PHP function to generate JavaScript client to build
and initialize the plupload.uploader object.
- set up plupload.Uploader object: browse_button, container, multi_selection, etc.
- Filter for file selection: images, zip, pdf, etc.
- Be able to set up metadata for MediaWiki File: file description, file category, comment, file name prefix, etc. (multipart_param option and BeforeUpload event)
- Be able to switch cursor between normal and wait.
- Error handling. (Error event from plupload).
- PHP function to generate JavaScript code to handle AJAX response from MediaWiki Special page. Bascially how to handle (display) the URLs for those uploaded files.
- Admin page to allow user to customize the attachment's metadata, category, file name, etc.
Attachment Metadata
- tags
- tags will attache to each attachment attached to a ticket. It could be the Categories if we save the file as a MediaWiki_ File.