ArctosDB / arctos

Arctos is a museum collections management system
https://arctos.database.museum
60 stars 13 forks source link

Unable to use % in taxon name searches #7865

Open Jegelewicz opened 4 months ago

Jegelewicz commented 4 months ago

Issue Documentation is http://handbook.arctosdb.org/how_to/How-to-Use-Issues-in-Arctos.html

Describe the bug A clear and concise description of what the bug is.

Trying to search a taxon name as H% vittatus and get an error.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://arctos.database.museum/taxonomy.cfm
  2. Put H% vittatus` in Taxon Name
  3. See error
ERROR_ID | BF1E6EA7-F96C-4A74-84CF09F5D5DAABAB -- | -- ERROR_TYPE | java.lang.IllegalArgumentException ERROR_MESSAGE | URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 0 in: " v" ERROR_DETAIL |  

Expected behavior A clear and concise description of what you expected to happen.

I expect to get something or nothing.

Screenshots If applicable, add screenshots to help explain your problem.

Data If this involves external data, attach the actual data that caused the problem. Do not attach a transformation or subset. You may ZIP most formats to attach, or request a Box email address for very large files.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Priority Please assign a priority-label. Unprioritized issues get sent into a black hole of despair.

dustymc commented 4 months ago

I don't have a handy solution. TACC's security scanner pretty much demands what I've done, always assuming "contains" rather than "starts with" probably isn't what most people want most of the time, I don't think I'd have the CPU to feed it, and that's not what you've asked for anyway. The only semi-realistic thing I can come up with is a second "just us" search option, which would introduce its own issues.

WriteSQL and

select scientific_name from taxon_name where scientific_name ilike 'H% vittatus%'

will probably get you where you want to be, but that's not really a solution.

I should at least update the control-link-thingees, and will keep looking for an alternative solution - going active to do SOMETHING, however unsatisfying.

Jegelewicz commented 3 months ago

This is incredibly frustrating and makes the managing of taxonomy for incoming collections untenable. I am reopening because this means I cannot do my job.

@ArctosDB/arctos-working-group-officers

Jegelewicz commented 3 months ago

This still doesn't work. I guess it is no longer possible? I cannot help incoming collections look for better names that exist in Arctos without this and expecting everyone to write SQL to do this kind of search is just not good. Also, assuming that I will be hand-holding everyone through this is unsustainable. This is one of the straws that is breaking this camel's back.

mkoo commented 3 months ago

How about logged in users wth taxonomy edits gets a field to allow this? Or split out the taxon name search to allow binomial searches? this a reasonable and needed wildcard search function

dustymc commented 3 months ago

Sorry, I auto-close by milestone and didn't change this before.

Yes, https://github.com/ArctosDB/arctos/issues/7865#issuecomment-2164069758 is the possible.

logged in users

That's still about the best I can come up with.

will be hand-holding everyone through this

Sounds like we need a tool?? (Hard to tell with the information I have...)

binomial searches

I don't really have that capability (this is matching namestrings), but a paired 'starts with' and 'ends with' fields might provide the functionality if that's better than a 'just us unencoded' option.