Not recognized the date fields for import a user from a csv file.

Field is not supported.

You may find this (currently unanswered) question on Drupal SE of some relevance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xurizaemon’s picture

Version: 7.x-2.1 » 7.x-2.x-dev

Not a fix for User Import, but it may help you to know that Feeds module imports date fields fine out of the box.

jeremymears’s picture

Having the same issue, trying to import join and expiry dates for social group from a membership csv.

You mention using Feeds, how would I use it to do this?

Would be nice to mention it in Docs of User Import that it doesn't support date fields

gisle’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Assigned: Unassigned » gisle
Priority: Major » Normal

Signing up for this.

gisle’s picture

Assigned: gisle » Unassigned
Issue summary: View changes
FileSize
4.35 KB

Here is a patch that implements the date field (i.e. "Date (ISO format)") provided by the Date project. It contains a plugin file ("date.inc") that should be placed in the "supported" sub-directory.

Please review.

To be honest, I am not sure if I've got this one 100 % right. I've verified that it works, but the solution is not as "clean" as I would like.

The only way I've found to make the project aware of the date field being supported was to uncomment that field in field.inc and not implement hook_user_import_form_field_match(). I would have preferred a solution where date.inc was self-contained and field.inc untouched, but this is as far as I got.

If there is anyone with more insight in these things than me that can improve this patch, please step forward!

For the record: This does not implement the two alternative date fileds (datetime and datestamp) that is also provided by the Date project. Also, it only implements a single date the Date project allow for a second date field to hold an end date. All those frilld will be added to the plugin after this patch one becomes RTBC. But for review purposes, i wanted this patch to be as basic and short as possible.

gisle’s picture

Status: Active » Needs review

Changing status.

gisle’s picture

Rerolled patch against latest 7.x-3.x-dev snapshot.

gisle’s picture

Assigned: Unassigned » gisle
Status: Needs review » Fixed

Fixed in the last development snapshot the 7.x-3.x branch.

gisle’s picture

Status: Fixed » Needs work

Setting back to "Needs work" as patch in #4 is not the right solution - rolling back.

The Date module should support field_date.

There is a patch in #3083277: Implement hook_field_user_import_supported_alter.

gisle’s picture

Status: Needs work » Closed (won't fix)

Closing, as this should be implemented in the Date module by applying the patch posted in #3083277: Implement hook_field_user_import_supported_alter.