CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • [GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
Pages: 1 [2] 3

Author Topic: [GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM  (Read 4476 times)

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
June 26, 2016, 02:45:50 pm
Hi Everyone!

I was struggling to add some media content while writing a blog on civicrm.org regarding the progress so far, so I made one on medium.com. Here is the link to the same: https://medium.com/@ypranay/half-way-through-gsoc-2016-da6f1d1baae9#.yxwiq59uo.

Do read! :)

P.S: Kindly leave your responses and comments at the bottom of the page, just like the last time.
P.P.S: Do not forget to watch the small video towards the end of the blog.


ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
June 27, 2016, 06:23:31 am
Log: June 27, 2016

Today, I added support for Membership data as well. We can now get similar summary (read pivot) tables for Membership data and Contribution data, by selecting either "Contribution" or "Membership" through a dropdown which dynamically updates the pivot table div element when the form is submitted.

I added a few derived attributes for membership data too. The updated extension is available here:https://github.com/ypranay/org.civicrm.civirebux. I will soon edit the blog I shared yesterday to contain screenshots of this newly added feature as well.

« Last Edit: June 27, 2016, 06:46:15 am by ypranay »

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
June 30, 2016, 03:57:22 am
Log: June 30, 2016

I am looking at resolving the issue for duplicated attributes for the contribution and membership pivot tables, replacing the earlier hacky fix.

Things I will look at next:
  • Adding support for saving a report template for loading/editing later
  • Replacing IDs by their lookup values using pseudoconstants (for now) for both contribution and membership pivot tables

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
June 30, 2016, 10:15:34 pm
Log: July 1, 2016

Resolved the issue of duplicated attributes for both membership and contribution pivot tables, replacing the earlier hacky fix with a clean one.

I will now look at replacing IDs by their lookup values using pseudoconstants for both membership and contribution data.
« Last Edit: August 07, 2016, 04:37:28 am by ypranay »

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
July 01, 2016, 03:10:22 am
Added support for downloading the report in CSV/TSV formats just now.

This was an important feature that I missed out in the last blog post. We can now view and download the report in TSV and CSV formats for both Membership and Contribution data.
« Last Edit: August 07, 2016, 04:37:40 am by ypranay »

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
July 05, 2016, 11:38:18 pm
Hi All,

Over the weekend I was working on adding support for saving/loading report configurations.

Pivottable.js provides a parameter to its pivotUI method by the name `onRefresh`, which is a function that is triggered every time the state of the pivot table is altered - adding attributes from the pooled list into rows/cols, filtering et cetera. Saving the state everytime in a local javascript object and then saving it into browser localStorage when the `Save` button is clicked <- This was the initial approach I was taking.

Brian and Jaap suggested that I should go with saving the JSON object pertaining to the pivot table configuration into a CiviCRM table and fetch it while loading, rather than saving it in localStorage. This was on Sunday. Its been a couple of days and I am currently working on implementing an AJAX call which will be made when the `Save` button is clicked. Had a small confusion regarding AJAX (because of xmlMenu and url mostly), which got cleared yesternight through a quick Skype chat with Brian.

As of now, the AJAX call returns success, which indicates that the new setup ajax url works fine. Will now look at handling the action that is triggered when this AJAX call is made. Added a BAO class for handling save action. Will add support for inserting the data object into a CiviCRM table now. 

I have added a new feature branch within my repository - saveConfiguration, which will contain commits towards adding functionality for saving report configurations. The latest code lives in this branch.

Thanks.
« Last Edit: August 07, 2016, 04:37:53 am by ypranay »

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
July 11, 2016, 07:38:52 am
Hi All!

I just finished adding support for saving reports within CiviREBUX. Users can now save the reports and give them a name as well. I will next look at providing support for loading one of the earlier saved reports.

- Pranay.

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
July 24, 2016, 12:10:59 pm
Hi All,

Sorry for the long pause since the last post - I was working on providing support for saving/loading report templates.

Initially, I added saving functionality using a basic javascript prompt which takes the name of the report template (by default, the current timestamp in yyyy-mm-dd hh:mm:ss AM/PM) and saves the report template into a CiviCRM-style table by initiating an AJAX-call with appropriate data params. The code lives in this branch: https://github.com/ypranay/org.civicrm.civirebux/tree/saveConfiguration

Then, Brian and Jaap asked me to use jQuery dialogs rather than basic js-prompts and CRM alerts and notifications instead of js-alerts. I then added support for saving report template by the means of a jQuery dialog which is quite similar to the one with js-prompt. Rest was again similar to the previous one. The code lives in this branch:
https://github.com/ypranay/org.civicrm.civirebux/tree/saveWithDialog

Then comes the trickier part - to load one of the saved templates. This is how I have worked it out - when user clicks 'Load' button, a jQuery dialog appears with a dropdown populated with the list of saved templates (obtained by firing an Ajax call inside the callback function under `open` param of the dialog), from which user selects one and presses 'Ok' which fires another Ajax call that gets the selected report template from the database table and overrides the existing configuration of the pivot table. The code lives in this branch:
https://github.com/ypranay/org.civicrm.civirebux/tree/loadDialog

Overriding the existing pivot table configuration JSON with the loaded configuration JSON and forcing the pivot table to refresh itself to accommodate the new changes was slightly tricky. After trying to refreshing/resetting the div which contains the pivot table and failing at it, finally the pivottable.js documentation helped. Setting the 'override' param of the 'pivotUI' to `true` solved the issue.

One more thing which I worked on recently was supporting field names with comma(s) in them, which might cause the pivot table to not load such fields properly, owing to the fact that they are stored in a comma-separated array. The configuration JSON treats such fields normally - for example: if the rows of the pivot table are - 'contribution one' and 'contribution two, with comma' , then `rows` key of the configuration JSON will have this value: ['contribution one','contribution two, with comma'].

But when this value is written to database, it is saved as a comma-separated string which is the central issue because it consumes the comma present in the given field name. This could pose problem when we are trying to load such a configuration because it might consider them as multiple fields, each separated by a comma. For example in the above case -- ['contribution one','contribution two','with comma'].

As of now, I have joined this array using a special delimiter '#' to yield a string which is stored into the database and later fetched and split using this same delimiter to obtain the required array of field names. For the above case, 'contribution one#contribution two, with comma'   <- this is the string which gets stored in the 'rows' param of the JSON object.

This hack solves the problem with comma-containing field names. I am yet to hear from Jaap and Brian about the same.

That's all for now! Thanks everyone for reading up to this point :D

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
August 07, 2016, 04:36:45 am
Hi All,

Time for some updates.

  • The latest code is merged into the master here: https://github.com/ypranay/org.civicrm.civirebux
  • Adding to the last post, I have added support for viewing saved reports using a jQuery datatable, wherein the user the click any row and the corresponding report gets loaded
  • With this, saving and loading functionality is fully functional.

Here is the link to a video which showcases the final look of CiviREBUX: https://vimeo.com/user53742933/civirebux.

I think I have finished the GSoC project from my end - including code refactoring and documentation (please find the wiki here: https://github.com/ypranay/org.civicrm.civirebux/wiki). I will now focus on publishing the final blog post for the end-term evaluation.

Will keep this forum posted with more updates.

Thanks.
Pranay.

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
Launching CiviREBUX : GSoC 2016 Completion
August 16, 2016, 02:40:44 am
Hi All,

This post marks the end of my wonderful Google Summer of Code 2016 journey  —  from 0 to +25834+/12684- through 117 commits. I would like to start off by first thanking Google for organizing Google Summer of Code 2016 and  CiviCRM for being such a warm hosting organization. Next, I would like to thank Brian Shaughnessy and Jaap Jansma — the best mentors I could have worked with, for always being there when I needed them and helping me throughout the journey. Last but not the least, I would thank Utkarsh Sharma — my friend from Indian Institute of Technology (IIT) Bombay, who worked with CiviCRM during GSoC 2015 and recommended me to apply to CiviCRM this year.

I am proud to finally launch the product which I worked on during GSoC 2016 — CiviREBUX. It is a native module extension for drafting CiviCRM-style reports via a drag-n-drop interface. It combines powerful visualization and transformation techniques which gives users full capabilities of modern browsers and the freedom to design the right elements for their reports. CiviREBUX also supports saving and loading of report templates for later use. By native I mean, it works equally well on all the three CiviCRM-supported CMS — Wordpress, Drupal and Joomla. CiviREBUX integrates seamlessly within your CiviCRM dashboard and goes live seconds after installing the extension. CiviREBUX is a mix of the most popular desktop-based spreadsheet software and fast browser applications — essentially, a spreadsheet software running on your browser.

Here are few of the important quick links:
  • GitHub repository containing the code for CiviREBUX: https://github.com/ypranay/org.civicrm.civirebux
  • GitHub wiki containing installation and usage instructions and documentation: https://github.com/ypranay/org.civicrm.civirebux/wiki
  • List of Commits: https://github.com/ypranay/org.civicrm.civirebux/commits/master
  • Link to the final completion CiviCRM blog post: https://civicrm.org/blog/ypranay/introducing-civirebux-native-report-building-extension-for-civicrm
  • Link to the final completion public blog post: https://medium.com/@ypranay/standing-tall-25834-12684-gsoc-2016-ad61fd915767
  • Link to a video showcasing how to use CiviREBUX: https://vimeo.com/user53742933/civirebux
  • Downloading zipped archive containing CiviREBUX: https://github.com/ypranay/org.civicrm.civirebux/archive/master.zip


Thank you everyone for following the updates and posts on this forum and elsewhere. I am certainly looking forward to contribute towards CiviCRM even after completion of Google Summer of Code 2016.

Regards,
Pranay.
« Last Edit: August 16, 2016, 02:44:50 am by ypranay »

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
CiviREBUX goes live on CiviCRM extensions page!
August 17, 2016, 11:52:10 pm
Hi Everyone,

I am pleased to inform that the first stable release (version 1.0) of CiviREBUX is live now on the CiviCRM extensions page.

Here is a link for the same: https://civicrm.org/extensions/civirebux-native-report-building-extension

Do check it out guys!

Thanks,
Pranay.

The Doctor

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • CiviCRM version: 4.7.x
  • CMS version: Drupal 7.x
Re: [GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
August 24, 2016, 11:36:12 am
Sorry if this is not the place to reach out to the developer, but I wasn't sure where else to do it.

I was excited to read about this extension and have installed it under CiviCRM 4.7.10 and Drupal 7.50. I have set the appropriate Drupal permissions.

When I chose CiviREBUX from the Reports menu in CiviCRM, it takes me to ~/civicrm/civirebux

However, the page is blank, nothing there. It is the same under both Firefox and Safari.

Any suggestion for how to get this working?

Thanks.

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
August 25, 2016, 03:34:35 am
Hi,

Thanks for bringing it to my attention. I am not sure why this is happening. Did you try testing it on any WP or Joomla site?

If not, please do. Meanwhile I will also suggest you to please create an issue on GitHub and kindly attach the screenshot of the screen which you are seeing along with the URL in the browser. Meanwhile I will try testing it myself as well.

Regards,
Pranay.

ypranay

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • Cogito Ergo Sum
  • CiviCRM version: 4.7.1
  • CMS version: WordPress
  • MySQL version: 5.0.27
  • PHP version: 5.2.0
[GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
August 29, 2016, 12:03:02 am
Quote from: The Doctor on August 24, 2016, 11:36:12 am
Sorry if this is not the place to reach out to the developer, but I wasn't sure where else to do it.

I was excited to read about this extension and have installed it under CiviCRM 4.7.10 and Drupal 7.50. I have set the appropriate Drupal permissions.

When I chose CiviREBUX from the Reports menu in CiviCRM, it takes me to ~/civicrm/civirebux

However, the page is blank, nothing there. It is the same under both Firefox and Safari.

Any suggestion for how to get this working?

Thanks.

Hi!

Turns out that the extension worked well when Jaap (one of the mentors for this project) installed it on one of the Drupal sites that he has. I checked it myself by installing it locally too. I guess you must have missed out something during installation.

Can you please try disabling and uninstalling the extension and retry installing it maybe? If the problem still persists, please let me know.

Thanks,
Pranay.

The Doctor

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • CiviCRM version: 4.7.x
  • CMS version: Drupal 7.x
Re: [GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM
August 30, 2016, 07:09:23 am
Thanks for your suggestions Pranay.

Unfortunately, I am not able to try it on Joomla or WordPress as I do not have those installed on my site. Drupal only.

I tried disabling it and uninstalling it, but no luck.

One thing I forgot to mention before was that when I first installed it, I had to do so manually. It was not showing up in CiviCRM's list of extensions at  ~/civicrm/admin/extensions?reset=1 under the "Add New" tab. Maybe I have not installed it correctly, but now it does show up in the list of installed extensions.

Also, if it is useful to know, the site uses PHP 5.6.21

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • [GSoC 2016] CiviREBUX: Report Building Module Extension for CiviCRM

This forum was archived on 2017-11-26.