the-blue-alliance-android icon indicating copy to clipboard operation
the-blue-alliance-android copied to clipboard

Event codes with numbers have numbers stripped from notification titles

Open lethosor opened this issue 4 years ago • 3 comments

Example - MIKE should be MIKE2: image This regex is likely the issue: https://github.com/the-blue-alliance/the-blue-alliance-android/blob/b43e02766e4d07fac3eadeed676e9a8b00ebd601/android/src/main/java/com/thebluealliance/androidclient/helpers/EventHelper.java#L37

lethosor avatar Mar 08 '20 20:03 lethosor

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

bherbst avatar Apr 06 '22 14:04 bherbst

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)

lethosor avatar Apr 07 '22 18:04 lethosor

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

Now I just think DC313 is a silly event code 😆

bherbst avatar Apr 10 '22 15:04 bherbst