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

[Autocomplete] Use choice_value in the WrappedEntityTypeAutocompleter in EntityAutocompleteField #1723

Merged
merged 1 commit into from Apr 14, 2024

Conversation

jakubtobiasz
Copy link
Contributor

@jakubtobiasz jakubtobiasz commented Apr 12, 2024

Q A
Bug fix? yes
New feature? no
Issues
License MIT

Currently despite setting the choice_value the \Symfony\UX\Autocomplete\Form\WrappedEntityTypeAutocompleter uses the id value of the entity. This PR allows to override the autocomplete result value in the entity autocomplete fields.

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Apr 12, 2024
@jakubtobiasz jakubtobiasz force-pushed the adjustable-autocomplete-value branch 2 times, most recently from 4b7e2f4 to 95a11f2 Compare April 12, 2024 07:37
Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

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

@jakubtobiasz, thanks for this PR! Do you think this could be considered a bug fix?

@jakubtobiasz
Copy link
Contributor Author

jakubtobiasz commented Apr 12, 2024

Hi @kbond,
considering the definition from the Wikipedia

A software bug is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

The

that causes it to produce an (...) unexpected result

part convinces me that might be categorized as a bugfix. We were pretty surprised it doesn't work that way :D.


I've updated the description, the question is whether there should be a 2.16.1 version or we should expect 2.17 as a next version.

@kbond
Copy link
Member

kbond commented Apr 12, 2024

We were pretty surprised it doesn't work that way :D.

Me too!

Anyway, it's just semantics and I really just wanted to clarify that this "felt like the intended use" which you have done.

The next version will be 2.17.0 so no worries about the changelog.

@@ -1,5 +1,9 @@
# CHANGELOG

## 2.17.0

- Allow defining custom values for the autocomplete results with using `choice_value` option in entity autocomplete fields
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Allow defining custom values for the autocomplete results with using `choice_value` option in entity autocomplete fields
- Allow `choice_value` option in entity autocomplete fields #1723

(just a suggestion)

Copy link
Collaborator

@smnandre smnandre left a comment

Choose a reason for hiding this comment

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

Thank you @jakubtobiasz !

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Apr 12, 2024
@kbond kbond force-pushed the adjustable-autocomplete-value branch from 95a11f2 to f63ff7d Compare April 14, 2024 16:03
@kbond
Copy link
Member

kbond commented Apr 14, 2024

Thank you Jacob.

@kbond kbond merged commit 1d157c9 into symfony:2.x Apr 14, 2024
6 of 7 checks passed
@norkunas
Copy link
Contributor

this was a duplicate of #1328

@jakubtobiasz jakubtobiasz deleted the adjustable-autocomplete-value branch April 15, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants