Motivation

With interest I followed the announcement of Rooms and read about its features in your blog. Another project targeting the same use case is Availability Calendars (AC), of which I'm the current maintainer. Both projects seem to have a lot of features in common, giving rise to the questions:

Should we bundle our forces? and if so, How to proceed to integrate?

Proposed resolution

Rooms will have booking integration from the start and seems at a high level to be more feature complete. So I think that if we decide to join forces, Rooms will be the target and thus AC, although older and more mature than Rooms, should provide an upgrade path.

Remaining tasks

To research a possible integration, we need answers to the following questions:

  • Are both sides willing to invest in this? I have put a twin issue on the AC queue: #1229920: [AC] Possible integration of availability_calendars and rooms to get attention from AC users. For now it is a yes from the developers (both maintainers of AC are positive regarding integration).
  • What features of AC are yet lacking in Rooms?
  • Which of those lacking features are a should/must have?
  • Can these features be added to Rooms?
  • Is there a possible upgrade path? Or are the data models to different to map one to the other?

I marked this task major as we need answers to the first and last questions quite quickly. The first because activity on AC has already been lowered. The last because any necessary breaking changes to the data model of Rooms should be made before its official release. The actual integration may and will take more time and is not foreseen for version 1.0 of Rooms. Rooms should now first deliver and release with its current feature set.

Comments

ronald_istos’s picture

Hi - yes definitely interested in working with you to provide an upgrade path.

I need to study availability calendars to see what features we are missing and what features will be the most important to move as well as figure out the upgrade process.

I don't think we should have major issues moving the data over and can certainly work on that aspect as I am more familiar with the Rooms data model.

Will have a better look and provide a more informed answer but overall I think it would be great to integrate.

fietserwin’s picture

Issue summary: View changes

first answer

fietserwin’s picture

Title: Possible integration of availability_calendars and rooms » [Rooms] Possible integration of availability_calendars and rooms
Pedro Lozano’s picture

Both availability_calendar and the room_availability modules are fields that can be attached to any entity.

So for the upgrade path we can conside two options:

  • Write a custom update function that converts all availability calendar fields to rooms availability fields. This would be mostly useless, people using availability calendar most of the time will be using it on nodes, and rooms uses a different entity (bookable unit), so the upgrade would not leave the data where it is needed. It also has the problem of been non rollback-able. And probably a hard upgrade to write so that it is reliable in all use cases.
  • The other option is to write integration for the Migrate module inside of Drupal Rooms availability field. The future of drupal upgrades seem to be to use the migrate module instead of update.php. See #1052692: New import API for major version upgrades (was migrate module). So it seems to me enough to have a field destination class that can fill the values of a rooms availability field. The migration mapping will have to be written by each user for its use case using the migrate api. Additionally we would provide a prepare callback that will be used when migrating from an availability calendar field, this will allow migration from availability calendar to rooms with minimun code (2 lines for each field).

My recommendation is to go for the Migrate module integration.

Pedro Lozano’s picture

Issue summary: View changes

.

acrollet’s picture

Assigned: Unassigned » ronald_istos
Status: Active » Postponed

At this point I think the approach that would make the most sense would be to talk this over whenever either of us is ready to seriously start D8 development. We are planning as modular/separable an architecture as possible for D8, so the rooms module should become a good base point for availability calendar type use cases, with or without bookings. We are at Drupalcon LA right now, if you're around, let's chat!