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

BUGFIX Fix conversion in CreationDialogPropertiesCreationHandler #3720

Merged

Conversation

kdambekalns
Copy link
Member

This makes the CreationDialogPropertiesCreationHandler use the convert() method from the NodePropertyConversionService to provide consistent behaviour.

How to verify it

See #3719 for steps to reproduce

This makes the `CreationDialogPropertiesCreationHandler` use the `convert()` method from the `NodePropertyConversionService` to provide consistent behaviour.
Copy link
Member

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice, we have a service for this. Neos is truly service-oriented :)

+1 by reading

@kitsunet
Copy link
Member

Yep, this place would be the third implementation of how to convert incoming stuff for node properties 😆 and it does things differently than the other two.

Copy link
Contributor

@grebaldi grebaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kdambekalns,

I ran the scenario you've described in the issue and can confirm that it works. 👍 for having consistency :)

Though I actually do believe that the property value should stick to the client's timezone, because server time may run counter to user's intent :/

@kdambekalns
Copy link
Member Author

But clients may be all over the world, so storing in one timezone and converting on output/display/use seems better. Plus, within the UI we rely on UTC…

@kdambekalns kdambekalns linked an issue Feb 16, 2024 that may be closed by this pull request
Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning that up :D

It seems the whole thing was introduced with #2596 and never really changed since. I stumbled upon this in Neos 9 and assumed it was "special" legacy handling code but was confused that it also exists in 8.3.

I plan with Neos9 to extract this whole part with #3519 deeper into the Ui php so that each NodeCreationHandlerInteface just gets a value object with deserialized elements. That way no creation handler has to come to the idea of doing it theirselves.

@Benjamin-K
Copy link

We have stumpled upon this several times now. If we select 10:00 in the creation dialog, 11:00 will be stored (because of UTC + 1).

@mhsdesign mhsdesign merged commit d0d8518 into neos:8.3 Mar 16, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent conversion in CreationDialogPropertiesCreationHandler
6 participants