Hi Justin,

For better or for worse, combo boxes aren’t available. I have shoehorned them 
into an extension, but it was not a fun process, at least for someone who hates 
working with JavaScript. You’ll need to extend one of the field classes (easy) 
and create a jQuery widget (tedious, painful, this is why I’m not a web 
developer). I would not recommend taking the approach I did of hijacking the 
existing inlineEditory widget; instead, I’d add a mechanism for selecting a 
different one. As a starting point, you’ll want to look in the 
jquery.gravy.inlineEditor.js file for an example of how to design a widget; the 
reviewRequestEditorView.js file is probably where you’ll need to do your widget 
integration.

Fortunately, Review Board makes replacing the components via an extension 
possible. To override existing JavaScript, I copied the whole files I needed to 
modify into my extension and added them to the js_bundles property. I have a 
poorly-written comment, “Order might matter for this hack”, right above the 
list, so if you choose this path, keep that in mind. :)

Hope this helps,
Andrew

From: Justin Palmer <justinpalme...@gmail.com<mailto:justinpalme...@gmail.com>>
Reply-To: reviewboard 
<reviewboard@googlegroups.com<mailto:reviewboard@googlegroups.com>>
Date: Thursday, January 15, 2015 at 10:53
To: reviewboard 
<reviewboard@googlegroups.com<mailto:reviewboard@googlegroups.com>>
Subject: ReviewRequestFieldsHook

Thank you for this extension! Adding our own fields to track additional 
metadata is very important.

https://www.reviewboard.org/docs/manual/2.0/extending/extensions/hooks/review-request-fields-hook/


> class NotesField(BaseTextAreaField):

Example is missing "from reviewboard.reviews.fields import BaseTextAreaField".


Would you mind adding examples for other fields? I tried looking up 
reviewboard.reviews.fields and I couldn't figure out how to add, for example, a 
combobox (option) field. I "wrote" my first Python yesterday when I downloaded 
rbseverity, replaced names and sections, ran 'python setup.py develop', 
restarted httpd, and enabled extension in Review Board.


--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://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 
reviewboard+unsubscr...@googlegroups.com<mailto:reviewboard+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://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 reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to