------------------------------------------------------------------------------ To reply, visit https://hellosplat.com/s/beanbag/tickets/4760/ ------------------------------------------------------------------------------
New ticket #4760 by shoven For Beanbag, Inc. > Review Board Status: New Tags: Priority:Medium, Type:Defect File attachments: * expected output.png <https://hellosplat.com/s/beanbag/attachments/1328/> * observed output.png <https://hellosplat.com/s/beanbag/attachments/1329/> ------------------------------------------------------------------------------ Update > Add File on a review request does not create a draft review request ============================================================================== # What version are you running? 4.0.x # What's the URL of the page containing the problem? /r/<review request id> # What steps will reproduce the problem? 1. Open an already published review request. 2. In the console, run the following commands: - RB.PageManager.getPage().reviewRequest.draft.id (expected output: undefined) - RB.PageManager.getPage().model.reviewRequestEditor.get('hasDraft') (expected output: false) 3. Select Update > Add File 4. Choose a file and upload 5. Once the page refreshes, run the commands again: - RB.PageManager.getPage().reviewRequest.draft.id (expected output: defined (some id), observed output: undefined) - RB.PageManager.getPage().model.reviewRequestEditor.get('hasDraft') (expected output: true) In contrast, try uploading a file with the drag-and-drop method and notice that all commands will return the expected output. # What is the expected output? What do you see instead? See steps above for expected output at each step. The main change is that after uploading a file, we expect RB.PageManager.getPage().reviewRequest.draft.id to be defined, but currently it is undefined (see attached files for expected and observed output). # What operating system are you using? What browser? macOS 10.13.6, Chrome Version 69 # Please provide any additional information below. Suggested fix: - Remove the reload in `views/uploadAttachmentView.js`. - `_onUploadFileClicked` in `reviewRequestEditorView` would need to pass the `this.model` in as something like `reviewRequestEditor` when constructing the `RB.UploadAttachmentView`. That view would then need to store that and, in `send()`, call `this.reviewRequestEditor.createFileAttachment` instead of `this.options.reviewRequest.createFileAttachment`. - Close the 'Add file' dialog. ------------------------------------------------------------------------------ -- You received this message because you are subscribed to the Google Groups "reviewboard-issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/reviewboard-issues. For more options, visit https://groups.google.com/d/optout.
