Add user field to change descriptions
Review Request #7765 — Created Nov. 12, 2015 and submitted
The
ChangeDescription
model now supports recording a user that is
associated with the change. The user should be retrieved via the
ChangeDescription.get_user
method, which will delegate determining the
user for the change description to the model the change is associated
with if it has not yet been determined. Once determined, it will be
saved to the database for faster retrieval in the future.The
user
field can currently only be calculated for change
descriptions associated with review requests.
- Ran unit tests.
- Viewed a review request that had its owner changed before this patch
was applied. The user was determined correctly for the change
descriptions.
Description | From | Last Updated |
---|---|---|
Undo this added line? |
|
- People:
- Depends On:
-
- People:
- Diff:
Revision 2 (+171 -15)
![reviewbot](https://reviews.reviewboard.org/static/ext/reviewbotext.extension.ReviewBotExtension/images/reviewbot.png)
-
Tool: Pyflakes Processed Files: reviewboard/changedescs/evolutions/__init__.py reviewboard/webapi/resources/review_request_draft.py reviewboard/reviews/tests.py reviewboard/reviews/models/review_request_draft.py reviewboard/reviews/models/review_request.py reviewboard/reviews/builtin_fields.py reviewboard/changedescs/templatetags/changedescs.py reviewboard/changedescs/evolutions/changedesc_user.py reviewboard/changedescs/models.py Ignored Files: reviewboard/templates/reviews/boxes/change.html reviewboard/changedescs/templatetags/__init__.py Tool: PEP8 Style Checker Processed Files: reviewboard/changedescs/evolutions/__init__.py reviewboard/webapi/resources/review_request_draft.py reviewboard/reviews/tests.py reviewboard/reviews/models/review_request_draft.py reviewboard/reviews/models/review_request.py reviewboard/reviews/builtin_fields.py reviewboard/changedescs/templatetags/changedescs.py reviewboard/changedescs/evolutions/changedesc_user.py reviewboard/changedescs/models.py Ignored Files: reviewboard/templates/reviews/boxes/change.html reviewboard/changedescs/templatetags/__init__.py