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

The event entity differs between schedule.json and events.json #896

Open
Starkmann opened this issue Jun 14, 2022 · 2 comments
Open

The event entity differs between schedule.json and events.json #896

Starkmann opened this issue Jun 14, 2022 · 2 comments

Comments

@Starkmann
Copy link

Starkmann commented Jun 14, 2022

Events.json:

id	664
guid	"3b8f09b5-d65a-41f8-be33-69cb486e8b98"
title	"A001 Friedensmarsch von West nach Ost"
subtitle	"2023 mit den Naturfreund…en Frieden marschieren "
organization	""
description	"Die Naturfreunde Deutsch…t Jahrzehnt auszurufen."
duration	6300
logo	"/system/events/logos/000…30Banner.jpg?1645458205"
type	"workshop"
do_not_record	false
track	"Kapitalismus, Gesundheit und soziale Krise"
abstract	"Ende April, Anfang Mai 2…r of Peace zu gewinnen."
speakers	[…]
start_time	"2022-08-19T16:30:00.000+02:00"
end_time	"2022-08-19T18:15:00.000+02:00"
room	{…}

Scheduler.json:

url	"https://"
id	666
guid	"bb3d871b-6209-4890-816a-892a75ffa4a8"
organization	""
logo	"/system/events/logos/000…rmento_2.png?1646093846"
date	"2022-08-18T10:00:00+02:00"
start	"10:00"
duration	"01:45"
room	"W300"
slug	"esu22-666-a005_theorien_…_der_konflikteskalation"
title	"A005 Theorien des Wandel… der Konflikteskalation"
subtitle	null
track	"Kapitalismus, Gesundheit und soziale Krise"
type	"workshop"
language	"en"
abstract	"Wie geschieht der Wandel…nnahmen übereinstimmen."
description	"In diesem Workshop erört…Martin Luther King Jr.)"
recording_license	""
do_not_record	false
persons	[…]
links	[…]
attachments	[…]

Besides missing fields in events.json there are more differences:

duration: Different format ""01:45"" <> "6300"
date <> start_time,end_time

This mages it really hard to map events to objects as they differ depending on how you get them.

@manno
Copy link
Member

manno commented Jun 14, 2022

Yes, they use different views:

vs.

You can match them via id/uid and choose for yourself. We can add fields to either one, but we shouldn't change existing fields as other tools use them (and might already have workarounds for this issue).

@Starkmann
Copy link
Author

Starkmann commented Jun 14, 2022

I can see that changing this is a braking change and i can also workaround it.

It just would be more clear if i could have one mapper that maps and event to an EventObject rather than having two because the fields are different depending on the view.

To give a mapping example:

events.json:

$event = GeneralUtility::makeInstance(Event::class);
$event->setStart(new \DateTime($resultEvent['start_time']));

schduler.json:

$event = GeneralUtility::makeInstance(Event::class);
$event->setStart(new \DateTime($resultEvent['date']));

But ok if it is intended to keep this i will workaround that too.

Just wanted to make sure that is is not a mistake and might get fixed.

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

No branches or pull requests

2 participants