Don't save every comment when publishing from the "Edit Review" dialog.
Review Request #6518 — Created Oct. 28, 2014 and submitted — Latest diff uploaded
The code that calculated whether or not we needed to save the comment models in
the "Edit Review" dialog was saving every comment, because we never fetched the
original extra data (which meant that it was comparing the extra data object
against undefined). This change adds some code to actually assign
this._origExtraData
, which fixes the issue.
- Ran js-tests
- Added some instrumentation and checked that when I had modified (but not
saved) a comment, it would save it as part of the publish operation, but if I
hadn't modified it, or if I'd modified and saved it, it would skip that and
only save the review.