[GSoC 2016] RepoBuilder - Report Builder GUI for CiviCRM

Közzétéve
2016-05-14 08:46
Written by
ypranay - member of the CiviCRM community - view blog guidelines

Hi Everyone! Thanks for visiting the blog post. I am Pranay (21 | Male | India). I am pursuing my Bachelors and Masters in Computer Science from Indian Institute of Technology Kharagpur and have just completed 4 years of undergraduate education. This is my first time at the prestigious Google Summer of Code programme and I am looking forward to a great FOSS-flavored summer. 

Jarvis is such a cool name given to an AI-based assistant, isn't it ? I call my project - RepoBuilder. Its a highly responsive, light-weight and user-friendly module extension for generating reports within CiviCRM, aimed towards facilitating customers to customize the report template as they want - a significant and required improvement over the existing reporting module in CiviCRM. RepoBuilder will be equipped with a drag-and-drop (WYSIWYG) interface (for the content blocks) along with added support for data transformation - sorting, pivoting, filtering et cetera. I am fortunate to have Brian and Jaap to mentor me throughout the project.

I could not dedicate much time since April 23 up till 9th May, thanks to my end-term examinations and other academic involvements. Its been a week since I have been getting started towards developing RepoBuilder and I want to share the updates for this week. 
 
I had some issues with my domain space, so I requested Brian to help me get some. He got me set up and running on one of his servers. I faced some earlier difficulties in installing the WordPress CMS, which were resolved during this week's check-in call with the mentors. I used the Softaculous Apps Installer to install WP, which by default enables multiple-hosting. This was causing the classic WP error "Could not connect to database".  After trying out hours debugging and re-editing the wp-config files, adding new MySQL users et cetera, I finally decided to bring this issue up during this week's check-in call. Brian found a hack by changing name of the wp-config files which caused WP to re-install itself. He then unset the multiple-hosting field which resolved the issue ultimately. 
 

Once that was done, the next task in hand was installation of CiviCRM on the WP CMS. Upon installing CiviCRM for the first time initially, I forgot to check the option with sample data. So, I decided to revert back to disabling the extension, deleting the civicrm folder within the plugins directory etc. and then finally re-installing CiviCRM, just to find that it still wasn't working. It gave the same error 500: could not handle the request. I requested the mentors if they could help me resolving the issue. Brian asked me to delete all the DB tables using the civicrm_drop.mysql file inside the civicrm/sql directory and to remove the civicrm.settings.php file, which will trigger a reinstall. I dropped all the tables, deleted the file but it still gave the same error 500. After spending hours on googling for finding a work-around I asked the mentors if they can help me one more time. Brian resolved the issue. He mentioned about a php error log file in the wp-admin directory that provided hints behind failures. He told, when CiviCRM installs, it creates a temp table that should be removed at the end of the process. On load, CiviCRM checks for its existence - if present it halts loading as it's an indication it may not have fully installed. He dropped the table and it resolved the issue.

Finally both CiviCRM and WP were set up and running. The next task was setting up a extensions directory followed by installing civix - an extension builder by Tim (totten). I set up an extensions directory by following the guidelines mentioned here on this url - 
 
/wp-content/plugins/files/civicrm/repobuilder/
Next, I was installing civix. I found the installation instructions a bit confusing. I first installed composer using the composer.phar (PHP archive) file (by following instructions here) and then installed civix by following the 2nd installation instruction here. Additionally, I had to put civix into the $PATH of the server I was on, so that I can readily access the civix from the CLI. So, I did a SSH into the server, updated the .bash_profile with the additional ~/civix/bin appended to the $PATH and finally sourced this .bash_profile for the changes to set in. Finally civix was set-up successfully.
 
I will now do: civix generate:angular-page to setup an initial AngularJS-based page, which is where the RepoBuilder will be built later. Following the recent trends at CiviCRM, Jaap suggested me to go for AngularJS rather than pure HTML, which is what I plan to do next.
 
I try my best to post daily to the CiviCRM Google Summer of Code forum set up here. Please find daily updates on this link and excuse me if I miss out posting some day, after all its vacation time ;). Will keep this blog updated with weekly updates too. 
 
Thanks for the patience to read through to the end. You can now redirect yourself to another tab, if you wish :D.

 

Filed under

Comments

Hi Pranay, this sounds great. Thanks for your work on CiviCRM and for choosing to implement such a useful feature to implement. My only thought is about the name 'RepoBuilder'. To me 'repo' suggests 'code repository' rather than 'report'. So I wonder if people won't understand what 'RepoBuilder' does just from seeing the name alone?

Good luck with the project - I look forward to seeing it in action!

Thanks JKingsnorth. Yes, it just hit me now that the name 'RepoBuilder' could mean something else too. Will come up with a better and cooler name and update the blog title soon. Thanks for bringing this up :)

Thank you for your hard work.  Is this going to be WordPress specific? 

Before you start building, might be good to get a decent idea of whats out there in report builder land and then figure out what subset you are going to tackle for CiviCRM. There are quite a few great report builders out there with a ton of functionality, so spending a week or two doing research on those is totally worth it, IMHO

lobo

 

 

Thanks a lot Lobo. As you suggested, I went across other paid and free reporting modules out there and found great inspirations in terms of the technologies or modules they used. 

I hope you continue giving me your valuable comments. And the same goes for all the viewers of the blog post. I would really want all of you to kindly comment/suggest something whenever you find time (might be a simple "Hey, I read your blog! Its good !!" :D). That's how we stay connected after all - the ultimate motive behind GSoC.

Hi Pranay,

It may be of interest to take a look at this repo for a new extension to provide Pivot table reporting for activities for CiviCRM (still in alpha but to be released in a few weeks):

https://github.com/compucorp/uk.co.compucorp.civicrm.activityreport

This is based on the https://github.com/nicolaskruchten/pivottable pivottable library which is quite powerful. It would be great to see this reporting extended to other areas of CiviCRM.

It provides most/all the functions that you have described above:

- drag-and-drop (WYSIWYG) interface (for the content blocks)

- sorting,

- pivoting,

- filtering

It can also creates dynamic graphs. We are working on using this for CiviHR.

Best

Jamie