Tool: Pyflakes Processed Files: reviewboard/admin/forms.py Tool: PEP8 Style Checker Processed Files: reviewboard/admin/forms.py
Attachment Storage Options (admin) not saving -- always reverts back to local storage option
Review Request #6432 — Created Oct. 11, 2014 and submitted
Attachment Storage Options (admin) not saving -- always reverts back to the local file storage option for attachments. This was because the form was trying to validate itself but it couldn't because OpenStack Swift fields required no matter which storage option was chosen.
The fix: set OpenStack Swift fields to be not required when selecting a storage option that is not OpenStack Swift.
Tested in Chrome, Firefox and IE:
- Hit save when local storage is chosen -> local storage is selected on refresh.
- Amazon S3 filled out and saved -> Change to OpenStack Swift, leave everything blank -> Save -> Navigate away and come back -> Amazon S3 chosen. (Reverse Amazon S3 and OpenStack Swift works too).
- Amazon S3 (or OpenStack Swift) filled out and saved -> Change to local storage -> Save -> Navigate away and come back -> Local storage chosen.
- Local storage saved -> Change to Amazon S3 (or OpenStack Swift), leave everything blank -> Navigate away and come back -> Local storage chosen.
- File attachment uploads to Amazon S3 and local storage works. Unable to test with OpenStack Swift since no account available to use.