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: allowing spaces in enum IDs #1884

Merged
merged 4 commits into from
Jun 5, 2023
Merged

fix: allowing spaces in enum IDs #1884

merged 4 commits into from
Jun 5, 2023

Conversation

TheSlimvReal
Copy link
Collaborator

see issue: #XX

Visible/Frontend Changes

  • [x]
  • [ ]

Architectural/Backend Changes

  • [x]
  • [ ]

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@github-actions
Copy link

Deployed to https://pr-1884.aam-digital.net/

@TheSlimvReal TheSlimvReal requested a review from sleidig May 25, 2023 08:35
@@ -307,7 +307,7 @@ export class QueryService {
key: string,
value: string
): any[] {
const values = value.replace(new RegExp(" ", "g"), "").split("|");
const values = value.trim().split(/\s*\|\s*/);
Copy link
Member

Choose a reason for hiding this comment

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

why is the simple .split("|") not enough here anymore? (maybe add comment to document this even?)

Copy link
Member

@sleidig sleidig Jun 5, 2023

Choose a reason for hiding this comment

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

@TheSlimvReal your comment explains the regex (I got that before already) but not why we need a regex and can't just split at any "|" 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's just safeguard so both male|female as well as male | female works. Spaces around the | are ignored allowing people to define the query either way.

sleidig and others added 2 commits June 2, 2023 16:05

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TheSlimvReal TheSlimvReal merged commit 7114bbb into master Jun 5, 2023
@TheSlimvReal TheSlimvReal deleted the enum_query_fix branch June 5, 2023 06:51
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.21.1-master.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.21.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants