Wei:
For an email recipient X:
1. An outstanding review request is a review request that:
a) is assigned to either a group containing X, or assigned to X
directly
b) has not yet been reviewed by X since the last revision.
> 2. In [reviews_reviewrequest], <last_review_timestamp> within last
> week & <shipit_count> =1
> How to show to discarded ones?
I wouldn't put the "ship it" logic in there. Instead, we'd look at
review requests where in the past week, the status has changed to
"submitted" or has changed to "discarded".
> 3. In [reviews_reviewrequest], <time_added> within last week
Sounds right.
> 4. In [reviews_review], if <timestamp> within last week, count
> <user_id>; rank <user_id>
This one might be a more complex query. Off the top of my head, I'd
get the list of reviews created in the past week, and group them / sum
them by author. The author with the highest rank is the "reviewer of
the week".
We might want to fine tune it somewhere down the line, but that'll
probably suffice for now.
Does this clear things up any?
-Mike