Add old status/public states to the review request reopened signal.
Review Request #8724 — Created Feb. 8, 2017 and submitted
This fleshes out the review request reopened signals to include
information on what the status and public states were prior to
reopening. Consumers can use this to more intelligently determine
whether to take action on the reopen. For instance, it could decide not
to send a message to a service for a review request that was previously
unpublished and is now being reopened, or it could send a different
message when reopened from a discarded state vs. a submitted state.Unit tests were added to test reopen functionality and resulting states,
including the new signal changes.
Unit tests pass.
-
-
reviewboard/reviews/models/review_request.py (Diff revision 1) For reopening, status and public haven't changed yet, so they're the same as the old values.
Would it perhaps make more sense to provide the new values in the signal so listeners could determine what will happen?
Change Summary:
Removed the new parameters from the reopening signal.
Summary: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+88 -6) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/tests/test_review_request.py reviewboard/reviews/signals.py reviewboard/reviews/models/review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/tests/test_review_request.py reviewboard/reviews/signals.py reviewboard/reviews/models/review_request.py