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

Feature/1561 time fields #1593

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from
Open

Feature/1561 time fields #1593

wants to merge 2 commits into from

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Feb 6, 2025

Description

Updated version of PR #1566 - thanks @jamesmacwhite!
Targets v5 (for Craft 4) and adds format options.

Original 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.

2 participants