How to control Predifined or Ical mapping?

Created on 31 July 2024, 4 months ago
Updated 12 September 2024, 2 months ago

When i add mappings i choose New... - New Ical source. Then i write name of the source.

After that some mappings stay in Predifined option group:

Another mappings stay in Ical group:

What deference between them and how to control group affiliation?

πŸ’¬ Support request
Status

Needs review

Version

2.2

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡¦Ukraine vasyok

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @vasyok
  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    Hi @VasyOK,

    The "Predefined" source values come from `src/Feeds/Parser/IcalParser.php` parser plugin. See https://git.drupalcode.org/project/feeds_ical/-/blob/2.x-dev/src/Feeds/P...

    The "Feed Entity" group is provided by Feeds module.

    The "Ical" group is added once you start adding custom source values. I did not see the Ical group until I added a test source in my local development environment.

  • Assigned to ben.hamelin
  • Status changed to Needs review 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY
  • πŸ‡ΊπŸ‡¦Ukraine vasyok

    Hi ben.hamelin
    Yes,
    If the feed source has name test, then this field stay in Ical option group.

    But what id if the feed source has name LOCATION,
    how to place it outside Predifined option group?
    https://www.drupal.org/files/issues/2024-07-31/predifined.png β†’

  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    @vasyok - The only way to move any of the Predefined source fields outside that group would be to override the src/Feeds/Parser/IcalParser.php class, specifically the getMappingSources() method.

    To my knowledge the group they are in has no affect on the final mapping. What is your goal in trying to regroup them?

  • πŸ‡ΊπŸ‡¦Ukraine vasyok

    Because if name of the source have same name as one of Predifined values - it's not imported correctly.

  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    That shouldn't be happening. LOCATION is provided as one of the default fields since it is expected in an ical feed.
    https://icalendar.org/

    Can you provide an example of your ICS / ICAL source file?

  • πŸ‡ΊπŸ‡¦Ukraine vasyok

    Sorry ben.hamelin, maybe i write something wrong.

    Now i catch only errors with date fields.

    My ics sourse file:

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-////NONSGML kigkonsult.se iCalcreator 2.26.9//
    BEGIN:VEVENT
    DTSTART:20240331T021300
    SUMMARY:Title 1
    END:VEVENT
    BEGIN:VEVENT
    DTSTART:20240331T021400
    SUMMARY:Title 2
    END:VEVENT
    END:VCALENDAR
    

    Mappings:

    Titles fields imported well but fields from DTSTART became
    1711851180
    and
    1711851240

  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    @vasyok Not sure, but it looks like you are mapping to a TEXT field that has a character limit. I would map those to Date / Time fields.
    As this appears to be an unrelated issue and the original request has been addressed, I'm going to close this issue.

    Thanks for using the module, if you have any suggestions for documentation or examples you want to add please feel free to open a merge request!

  • πŸ‡ΊπŸ‡¦Ukraine vasyok

    My TEXT field that has a character limit have default characters limit 255. End i import to this field from XML sources. But from ical - no.

  • πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

    @vasyok - Thank you for that clarification and additional info. I understand now that you wish to have access to the raw values for DTSTART and DTEND. I have opened this issue in response to address: https://www.drupal.org/project/feeds_ical/issues/3477371 ✨ Provide the DTSTART and DTEND values as raw strings Active

Production build 0.71.5 2024