Move from reviewableIDField to defaultCommentBlockFields in Reviewables.

Review Request #4242 — Created June 14, 2013 and submitted

Information

Review Board
master

Reviewers

Move from reviewableIDField to defaultCommentBlockFields in Reviewables.

reviewableIDField was used to indicate which ID field in the
Reviewable's attribute list should be populated into any newly created
CommentBlocks by default. This wasn't very clearly named, though, and
wasn't sufficient for diffs. With diffs, you have two identifying pieces
of information: The filediff's ID, and possibly the interfilediff's ID.

This new field, defaultCommentBlockFields, is a list (or optionally a
function returning a list), and can be used for more than the ID, if
needed.

This has backwards-compatibility with existing reviewables, but will log
a deprecation warning.
Tested with the beginnings of my upcoming diff changes.

Tested with file attachment pages.

Tested with the file attachment pages, pre-update, that they caused the
deprecation warning, but still worked.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        reviewboard/static/rb/js/models/screenshotReviewableModel.js
        reviewboard/static/rb/js/models/fileAttachmentReviewableModel.js
        reviewboard/static/rb/js/views/abstractReviewableView.js
        reviewboard/static/rb/js/models/abstractReviewableModel.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...