3540: Add signals for when a draft is discarded, including a reason for why it was discarded

mconley
What version are you running?

2.0.3alpha 0 (dev)


What's the URL of the page this enhancement relates to, if any?

n/a


Describe the enhancement and the motivation for it.

We've written an extension for Review Board that performs certain acts when publishing, closing and discarding review requests. Unfortunately, there wasn't a way of detecting when a draft for a review request is discarded. We ended up having to use Django's pre_delete model signal, which felt a little heavy-handed, since it will run for every model deletion. We also had to do a bit of checking to see if the draft is deleted when they're manually discarded, or when they're deleted when a review request is published. It'd be nice if the signal made this distinction for us.