Membership "join_date" is ignored on import
Overview
When importing memberships ("Create" context) on the latest Civi release (5.20.2), if a "Member Since" value is mapped and imported, it will be ignored and the current date will be used.
Reproduction steps
- Click Memberships->Import Memberships
- Import any membership data CSV file with a Member Since column and map that to the import
- After import, note that the current date was used on all created membership records
Current behaviour
Memberships are always imported with Member Since as current date, regardless of provided Member Since value in mapped import
Expected behaviour
Memberships are created with the mapped Member Since date
Comments
Looking into the code, I noticed that \CRM\MemberImport\Parser\Membership.php
has been modified extensively to map membership_start_date
and membership_end_date
to start_date
and end_date
values in the final formatted parameter set. However, membership_join_date
is left alone and unformatted and a default-value join_date
is created instead. This resulting structure appears to be fed into the Membership::create() method.
A modification of that code file which adjusts membership_join_date
in the same way as the other values results in a correctly imported Member Since value. I have NOT tested this modification with the Membership import in an update context, however.