Install

Works with Drupal: ^9.4 || ^10.2 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 425.22 KB
MD5: 5eba60ef68ef1f51e5252e0b7382c9a9
SHA-1: 176f013cda0cc79b6cd12e931bf705b4545c317d
SHA-256: 95c778df6b4d9ef1e8fa939530e10c5804455a07701fdd10fd6adb25513f4996
Download zip 589.69 KB
MD5: 5c7c6f83b0296fdf86d1fb5c40a71d3b
SHA-1: ccc85c9c22668e7ffd02e46b2cb4a13681bb0f3f
SHA-256: b02fe85b969a06529cdb2d3b781b4b12d48b760c7cb7a08b3f97c027f60a9038

Release notes

Summary
-------

This release adds a JSON import pipeline for special_night nodes and
fixes a date range matching bug in the SpecialNights Price Alterator
that caused special prices to be silently ignored.

New features
------------

- JSON import for Special Nights.

Two Drush commands are now available:

- drush bhpas:check
Validates the configuration and prerequisites without writing to
the database.

- drush bhpas:import
Creates or updates special_night nodes from JSON files, matching
on the (field_nights.value, field_room.target_id) pair. Supports
--dry-run, --force and --source-dir options.

The import is idempotent: running it multiple times updates the
existing nodes instead of creating duplicates.

- New configuration fieldset "Import from JSON" in the Special Nights
alterator settings, exposing the source directory, nights/adults,
primary and secondary channel discounts, and imported node status.

- Sample JSON fixture at tests/fixtures/special_night_example.json,
with a format reference in tests/fixtures/README.md.

Bug fixes
---------

- Fixed: the SpecialNights plugin did not match nodes whose check-in
was stored at 23:00 and check-out at 22:59, because the query
compared against T00:00:00 and T23:59:59. As a result, special
prices were never applied to the room calendar. The date range
conditions have been corrected.

Upgrade notes
-------------

No database updates are required. After updating the codebase:

drush cr
drush bhpas:check

If you were already using a previous import implementation, open the
"Import from JSON" fieldset in the Special Nights form and re-save it
to migrate the configuration keys to their new names
(import_discount_primary, import_discount_secondary).

Full changelog
--------------

- Added: bhpas:check and bhpas:import Drush commands.
- Added: "Import from JSON" fieldset in the Special Nights form.
- Added: tests/fixtures/special_night_example.json sample fixture.
- Added: tests/fixtures/README.md format documentation.
- Fixed: SpecialNights plugin date range matching conditions.
- Changed: module strings translated to English.
- Changed: Drush commands moved to src/Drush/Commands/ (Drush 13).
- Removed: drush.services.yml.

Created by: afagioli
Created on: 25 Oct 2026 at 09:07 UTC
Last updated: 25 Oct 2026 at 09:07 UTC
Bug fixes
New features

Other releases