Subscribe to CiviCRM Blog feed
Posts related to Drupal
Updated: 1 hour 56 min ago

Using Views Bulk Operations to alter CiviCRM data

April 14, 2015 at 1:10am

We have started a small collection of blogs about using Views, Views Bulk Operations (VBO) and CiviCRM Entities to provide a Views-based interface for bulk updating Civi data.

This opens up a number of possibilities for bulk data updating which may not yet be straightforward in CiviCRM itself.

The recipe is basically

  • install CiviCRM Entity version 2.x & Views Bulk Operations VBO
  • create a View based on the Civi entity in question eg Contact or Participants or Relationships
  • add the VBO field and configure the desired 'bulk operation'

Setting up a View with a bulk operation to modify the entity in question is pretty straightforward. The one 'catch' at this point is that as far as VBO is concerned, we have to enter the CiviCRM 'value' not the 'label', so if you are wanting to update a Participant Status to attended you need to know that is a '2'.

Scenario 1 - updating a Participant Status to 'attended' as people come through the door

So in this case the use case was that an invite had gone out from civi, some had responded and had been set to a Status of 'RSVP-yes', others had not responded and were hence still Status of 'Invited'.

The View then provides the client with a simple interface where they can tick off names as they come to the event, and at the end of the evening, set them all to 'Attended'.

You can see a longer explanation with many screenshots etc here and grab a txt version of the View from here. A screenshot of the way to set up the VBO field is below.

Scenario 2 - setting End Dates (or whatever) on Relationships in bulk

In this situation we needed a bulk updating interface for Relationships so that relationships can be set to inactive along with the End Date.

Eileen has set this up as a Feature you can try out here.

Categories: Planet Drupal

Help get CiviCRM firing with Drupal 8 beta

February 25, 2015 at 5:35am

Can you help Fuzion take the Drupal 8 integration module that was developed as part of 2014 Google Summer of Code and get it working with the most recent version of Drupal 8 and publicly available for testing?

Getting CiviCRM ready for Drupal 8 was always going to be a task with many stages. Thanks to the funding from the Google Summer of Code 2014 in August last year Torrance, was able to get CiviCRM functioning well on what was then the latest alpha of Drupal 8. Highlights of this work included a native, Drupal-side installer for CiviCRM, Views integration using CiviCRM to discover the database schema (cutting the Views module from 15,000 lines to code to under 2,000), and a set of integration tests for both CiviCRM and Views.

But as Drupal 8 has continued active development, many core APIs have changed and ….. the integration has regressed.

Lots of these changes are relatively minor: during alpha there were still plenty of structured arrays hanging around which have now mostly been moved into well defined interfaces; or similarly plenty of hard dependencies on object classes have been abstracted into interfaces. There’s also been a few slightly more significant code changes, with several hooks that were still hanging around having been pulled into the new plugin system for example.

Drupal 8 is now at beta 6 and is becoming much more stable; APIs have settled down and the code churn is much reduced. Now is a good time to work through the existing Drupal 8 integration code, update function signatures to match the new interfaces, and get CiviCRM working correctly on Drupal 8.

By getting through this next tranche of work we can set the ground for thorough testing of the module in the lead up for Drupal 8.0 final.

Fuzion is proposing to fund 1 hour for every 4 hours funded for the next tranche of 50 hours of work (our estimate for getting Drupal and CiviCRM playing nicely enough that we can get this pushed out). So yes we are looking for others in the CiviCRM community to chip in and help fund this important work to make sure CiviCRM is set for Drupal 8.

Can you help us push on with this next stage so we can get the integration available for public testing? If so please drop by this page and chip in.

Categories: Planet Drupal