Summary
Report builder defines a custom view display, and takes those view results as a data input. It allows users to create a table or chart whose data points are the result of that view. The user can then alter the exposed filters for each individual data point. This allows users to control dynamic reports without knowing any SQL and without needing to have the Views UI exposed. For example, a simple view could be set up that aggregates the total number of nodes on the site, with an exposed filter for creation date. A user could easily put together a 4 column table showing the number of nodes on the site over the last 4 months by changing the exposed filter's date for each of the table's four columns. Similarly, that same view could be set up with a sticky / not sticky exposed filter. A two-bar bar chart could be created with one bar showing the total number of sticky nodes, and the other showing the un-sticky node total.
While sometimes these reports could be generated more efficiently with a single query, Report Builder provides for the flexibility of filtering the data points in a multitude of ways that isn't always possible in a single query. And it exposes the functionality to more novice users than those ready to get into the Views UI.
Integrates with the chart, ctools, and views modules.
Project Page
http://drupal.org/sandbox/mkadin/1447772
PAReview.sh
Git Command
git clone --branch master mkadin@git.drupal.org:sandbox/mkadin/1447772.git
Drupal Version
Drupal 7
Reviews of Other Projects
http://drupal.org/node/1403766#comment-5636562
http://drupal.org/node/1449530#comment-5636526
http://drupal.org/node/1445918#comment-5636500
Reviews of Other Projects Round II
http://drupal.org/node/1268340#comment-5641304
http://drupal.org/node/1449530#comment-5641216
http://drupal.org/node/1254718#comment-5641190
But wait...there's more!
http://drupal.org/node/1452328#comment-5662004
http://drupal.org/node/1457206#comment-5655404
http://drupal.org/node/1454106#comment-5662046
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | drupalcs-result.txt | 1.73 KB | klausi |
Comments
Comment #1
mkadin commentedJust some notes as I clean up this project:
1) I've finished the PAReview.sh review process and committed all of the necessary style changes.
2) I've added a sample report builder default view as an example of what views incorporated into report builder could look like. I've also added a bit to the install hook to generate 2 example reports so new users can get the idea.
Comment #1.0
mkadin commentedMade some formatting changes and added link to PAReview.sh for this project.
Comment #2
mkadin commentedComment #3
klausimanual review:
<em>@title</em>": use the "%" placeholder, it will generate em tags for you.'<h2 id="report-builder-title">' . $report['title'] . '</h2>'": again, the title should be sanitized here.Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #4
mkadin commentedThanks, I've made the requested changes.
A note: as best I can tell, using 'serialize' => TRUE in hook_schema serializes the data when its stored, but it does not unserialize it when the data is read back out. So I have included the change in hook_schema, and removed the serializing in report_builder_save(). But I left in unserialize() in report_builder_load despite your suggestion.
Comment #4.0
mkadin commentedadded Reviews of Other Projects section for priority reviewing.
Comment #5
mkadin commentedComment #6
valeriod commentedLooking at the previous issues
the difference between the two is that $form_state['input'] is the raw user input and it shouldn't be used unless you understand possible security implications. Almost all the FAPI functions use $form_state['values'] for their processing. If $form_state['values'] doesn't work for you for whatever reason I think it's OK to use $form_state['input']
Comment #7
mkadin commentedThanks for the clarifications @valeriod. I read up on the difference between ['input'] and ['values'] and the security implications. I'll look into these and fix them up where needed before undergoing another review. Don't want to waste the bonus when I know there could be security problems.
Comment #8
mkadin commentedSwitched over to values in most cases and added a few more check_plains in various places where user-entered data is outputted. Definitely more secure now.
Comment #9
mkadin commentedLooks like 'values' unexpectedly caused some problems. Changing status.
Comment #10
valeriod commentedmkadin, it can happen, I have seen it before because FAPI processes these values. If using values doesn't work for you then use input, make sure that there are no security implications and add a note explaining why it has to be so.
Comment #11
mkadin commentedSwitched back over to values for all form elements with one exception where it caused problems. Noted in the comments that I had to use input there. A few other security fixes included (check_plain() on table headers). Ready for review.
Comment #12
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #13
mkadin commentedThanks for the suggestions. I've gone through the code an implemented them, being careful to use the placeholder functionality of t('') and checking for double escaping. I believe I've got them all.
Comment #13.0
mkadin commentedAdded more reviews to the Reviews of other projects section.
Comment #14
mkadin commentedBing! Bonus!
Comment #15
klausimanual review:
Otherwise this looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #16
mkadin commentedThanks @klausi, I've searched through the code and removed a few instances of the check_plain issue you describe. Thanks to you and everyone else for all your help in reviewing this module!
Comment #17
patrickd commentedSo, let's get picky ;)
drupal_write_record('report_builder', &$report);Oo! Call-time pass-by-reference has been deprecated! Be careful with copy and paste.while ($i < sizeof($values)) {don't do such, as it's a while loop it'll re-execute it's condition on every loop, so the sizeof will be executed over and over again<>operator is normally only used in sql queries, it's unusual to see it in code, maybe you replace it with!=?Beside that I had several warnings and notices during testing I couldn't really reproduce (tested on a clean local install), so consider creating an early alpha release first and do some more intensive testing with different configuration and on different environments.
As this is a quite big module there's probably more we've missed but I'm pretty sure there just minor issues and I think your definitely experienced enough to maintain your projects seriously.
So, thanks for your contribution and welcome to the community of project contributors on drupal.org!
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #18.0
(not verified) commentedAdded additional reviews of other projects for the bonus!