Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for importing Time fields #1566

Open
wants to merge 1 commit into
base: 6.x
Choose a base branch
from

Conversation

jamesmacwhite
Copy link
Contributor

@jamesmacwhite jamesmacwhite commented Dec 29, 2024

Description

This adds initial support for Feed Me to properly handle Craft time fields. Currently time fields are only possible to be imported when times are written as strings. This update parses time values through the DateHelper to ensure they are valid. Using the existing DateHelper, the parseTimeString method is used to parse mapped values.

In addition, the default value on the mapping uses a Craft time field, rather than a plain text field

The following test data was used as part of testing:

{
  "content": [{
    "title": "Example entry title 1",
    "startTime": "13:00",
    "endTime": "15:00"
  }, {
    "title": "Example entry title 2",
    "startTime": "01-01-1900 16:00",
    "endTime": "01-01-1900 18:00"
  }]
}

This is the initial starting point to ensure time fields can be used in Feed Me, currently there is no proper handling of this field type leading to issues with importing.

Related issues

#1561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant