Now, Our manager requires me to add a javascript before execution
of review_request_close view function. This script will judge whether
all reviewers had shipit, and which one of those reviewrs still not
"ship it", If there are some people still not "ship it", The
reviwe_request_close function will not executed.
   I don't think it is a good idea though. I had read some source and
found the htdocs/media/rb/js/Review.js
------------------------------------------------------------
$("#link-review-request-close-submitted").click(function() {
        /*
         * This is a non-destructive event, so don't confirm unless
there's
         * a draft. (TODO)
         */
        gReviewRequest.close({
            type: RB.ReviewRequest.CLOSE_SUBMITTED,
            buttons: gDraftBannerButtons
        });
-------------------------------------------------------------
before gReviewRequest.close , That may be a good place to execute that
script ( I am not familar with this kind of JS Syntax though). But I
don't know, How can this javascript access python modules like
ReviewRequest and Reviews, Groups, User etc. If it can't access those
objects, How to judge  whether all Reviewers had "Ship It"? Need help.

Best Regards!

On 3月9日, 上午5时55分, Christian Hammond <chip...@chipx86.com> wrote:
> I recommend looking at the list archives for posts about policy support. We
> can't support any code with custom rules like this until we have that code
> go in (2.0 timeframe).
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.reviewboard.org
> VMware, Inc. -http://www.vmware.com
>
> On Mon, Mar 8, 2010 at 1:22 AM, JohnHenry <qhlonl...@163.com> wrote:
> > Hi,
> >    We had a new requirement of 'close condition'. Only if all target
> > reviewers had "ship it" this review, The submitter can 'close' this
> > review request by click "submitted".
> >    I had noticed that there will be a change in review board about
> > reviewers' "ship it" and submitters' "close" operations. But I am not
> > sure. I am trying to change the source of Reviewboard about this. But
> > cloudn't find which view function will be called when the submitter
> > click 'submitted' item of the menu. I tried to change the
> > "review_request_close" function in json.py, But it doesnot works. Can
> > any body give me some suggestion?
>
> > Best Regards!
>
> > --
> > Want to help the Review Board project? Donate today at
> >http://www.reviewboard.org/donate/
> > Happy user? Let us know athttp://www.reviewboard.org/users/
> > -~----------~----~----~----~------~----~------~--~---
> > To unsubscribe from this group, send email to
> > reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to