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

Event codes with numbers have numbers stripped from notification titles #948

Open
lethosor opened this issue Mar 8, 2020 · 3 comments
Open
Labels

Comments

@lethosor
Copy link

lethosor commented Mar 8, 2020

Example - MIKE should be MIKE2:
image
This regex is likely the issue:

private static final Pattern EVENT_KEY_PATTERN = Pattern.compile("[a-zA-Z]+");

@bherbst
Copy link
Contributor

bherbst commented Apr 6, 2022

Unfortunately adding digits to that RegEx doesn't fix this issue due to events like https://www.thebluealliance.com/event/2022dc313

@lethosor
Copy link
Author

lethosor commented Apr 7, 2022

Not sure I see the difference between 2022dc313 and 2020mike2. Is the issue you're referring to that matching digits would also pick up the year? 2020mike2 would have the same issue.

I don't think I had a particular fix in mind for this, but a couple possible variations that occur to me now are

  • [a-zA-Z]+[0-9]* (if we assume digits only occur at the end of the event code)
  • [a-zA-Z][a-zA-Z0-9]* (if digits can occur anywhere after the start of the event code)

@bherbst
Copy link
Contributor

bherbst commented Apr 10, 2022

Ahh, I see - was looking at the wrong thing.

Now I just think DC313 is a silly event code 😆

@bherbst bherbst added the bug label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants