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

fix: add datetime in editable date form types for SetObjectFieldValue… #6071

Merged
merged 1 commit into from
May 2, 2020

Conversation

VincentLanglet
Copy link
Member

@VincentLanglet VincentLanglet commented May 2, 2020

Credit to #6034
I just rebase 3.x and squash commit. The fork doesn't allow pushes from maintainers.

Fix datetime not handled correctly in editable formtypes of SetObjectFieldValueAction

We have found a bug introduced in 3.38 with SetObjectFieldValueAction.
When using editable datetime formtype in datagrid configuration
the case was not handled correctly anymore since Action introduction (3.38.0)

Until now only editable "date" fields were correctly handled.

This PR fix this behaviour and add the datetime formtype as
transformable to DateTime to be correctly handled in typehinted setters

Tests have been added to illustrate the case
Without the PR
testSetObjectFieldValueActionWithDateTime wouldn't pass.

I am targeting this branch, because this patch is backward compatible up to 3.38

Changelog

### Fixed
- Bug when trying to edit a datetime formtype in datagrid

Closes #6034

…Action

When using editable datetime formtype in datagrid configuration
the case was not handled correctly since Action introduction.
Until now only editable date fields were correctly handled.

This PR fix this behaviour and add the datetime formtype as
transformable to DateTime

Tests have been added to illustrate the case, without the PR
testSetObjectFieldValueActionWithDateTime wouldn't pass.
@VincentLanglet VincentLanglet requested a review from a team May 2, 2020 12:22
@VincentLanglet VincentLanglet marked this pull request as ready for review May 2, 2020 12:41
@greg0ire greg0ire merged commit 2575021 into 3.x May 2, 2020
@greg0ire greg0ire deleted the fix_setobjectfieldvalue_with_datetime branch May 2, 2020 12:43
@greg0ire
Copy link
Contributor

greg0ire commented May 2, 2020

Thanks @VincentLanglet @xleliberty

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.

None yet

3 participants