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

UHF-9953: Sort the autocomplete result by title length. #296

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

rpnykanen
Copy link
Contributor

@rpnykanen rpnykanen commented Apr 22, 2024

UHF-9953

Some of the older entities cannot be found by entity reference field's autocomplete.

What was done

Sort the entity reference autocomplete by title length to ensure that all results are reachable

How to reproduce

  • Go to edit any page with Link bank-paragraph added to it
  • Try to add "Neuvonta" -link to the linkbank
  • Autocomplete won't offer "Neuvonta" as result.

How to install

  • Make sure your instance is up and running on correct branch.
    • git checkout UHF-9953_links
    • make fresh
  • Run make drush-cr

How to test

  • Go to edit any page with Link bank-paragraph added to it
  • Try to add "Neuvonta" -link to the linkbank

Autocomplete will give you results sorted by title length, including "Neuvonta".

  • Check that this feature works
  • Check that code follows our standards

…ts will never be seen in entity reference autocomplete field
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

This worked very nicely 🦖

@rpnykanen rpnykanen merged commit e62d46f into dev Apr 22, 2024
2 checks passed
@rpnykanen rpnykanen deleted the UHF-9953_links branch April 22, 2024 09:55
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

Successfully merging this pull request may close these issues.

2 participants