That’s definitely the wrong form for it to be sending. It should show up as “extra_data.veto=1”. You see the same behavior in your extension?
That repro case is helpful. I’m going to dig into that. Christian On Thu, Dec 14, 2017 at 22:46 Xy Sui <[email protected]> wrote: > Hi, > > I'm testing the setExtraData in this way now (also to simply the code > demonstration here) > > In reviewboard/static/rb/js/views/reviewDialogView.es6.js, method > "_saveReview". I added/modified 2 lines inside the 1st block f of > funcQueue('reviewForm').add: > > *this.model.setExtraData("veto", 1);* > > and > > saveFunc.call(this.model, { > attrs: ['public', 'shipIt', 'forceTextType', > 'includeTextTypes', 'publishToOwnerOnly',' > *extraData*'], > > The expected result is each time one review is saved ,the "veto" field in > extra_data will be saved as well. And I got the payload in client side is: > > api_format=json&public=1&ship_it=false&force_text_type=html&include_text_types=raw%2Cmarkdown&extra_data%5Bveto%5D=1 > > You could see one param "extra_data[veto]: > 1" is included inside, while the review resource API doesn't accept it > because it only accepts 3 forms: extra_data:json, extra_data:json-patch and > extra_data.xxx > > In my payload, the key name with square brackets "[veto]" is not taken as > correct extra_data fields. > > I got the same results in FX and chrome. > > Do you have the example code for modified rbstopwatch? > > > > On Thursday, December 14, 2017 at 7:00:10 PM UTC+8, Xy Sui wrote: >> >> Hi, >> >> I'm getting desperate after hours' searching/trying... One of our >> extensions doesn't work now in RVB3.0 because previous setExtraData method >> doesn't work anymore for review model. >> >> In my implementation, I wrote one RB.ReviewDialogHook javascript hook >> with one customized view. And I would like to save some data in model >> Review's extraData field. I noticed model Review does have "setExtraData" >> method, but it's not working... >> >> And it looks like the extension rbstopwatch also saves data in >> extra_data, while the extension is broken in RVB 3.0 as well. So I couldn't >> find one working example either. >> >> Could anybody help? Or anybody has one working example for extra_data >> setting in javascript? >> >> Thanks. >> >> BR >> oswicer >> >> >> -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "reviewboard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Christian Hammond President/CEO of Beanbag Makers of Review Board -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
