One of the requirements in a project I am working at the moment was that the client wanted to enter when an adress becomes active. E.g. a member says he is moving by the 1st July 2015 (which is in the future). From that moment the member should be contacted by that address and till that moment the old address is the active address.
I have created an extension which achieve this. This extension is in beta and can be found on (https://github.com/CiviCooP/org.civicoop.futureaddress).
I will put this extension into the extension directory later on, when my client has finished testing this extension.
How does this extension work?
As a user you enter a future address by adding a new address on a contact and you set two things:
- You enter a location type which is a future one
- You enter a change date (the date when this address is changed)
This extension checks daily for any addresses with a location type in the future (see later on what this is). And it will then check the date for the change of this address and if the date has passed then the old address is archived (see later on what I mean by this) and the future address will be changed from the future location type to the current location type.
Future location types
Future location types are location types with a name which starts with "new_" followed by the name of the location type in which this changes. E.g. for a future home address you enter the name new_Home the display name of the location type could be something which explains it to your user. In this case it could be something like Future home address.
Archived addresses
An acrhived addresses is saved as a Address Change activity at the moment the address is changed. This way you can find back the old address information in your system. For developers you can disable or change this behaviour quite easily, see herefore the documentation at github.
Setup
The only thing you have to do is to set up location types for future addresses. E.g. create a new location type for a future billing address with the name new_Billing.