Skip to content

Add support for dash-separated ranges in the Query Builder #6399

@grantfitzsimmons

Description

@grantfitzsimmons

Is your feature request related to a problem? Please describe.

In Specify 6, users can search a range simply by adding a dash after a numeric catalog number.

For instance, in Specify 6, a user could build a query on the Catalog Number field like this, using the "In" operator:
33043-33049, 352000-26, 352028-49, 33040

This would return all of the Collection Objects that are between 33043 and 33049, 352000 and 352026, 352028 and 352049, and also return 33040.

Specify interprets the dash as a range, and can interpret this whether or not the final number in that range is a whole number (e.g. -33049) or n number of digits (e.g. -26). This does not get reformatted to match the 9-digit numeric catalog number formatter as is required in Specify 7.

Image

Describe the solution you'd like
It should work just as it did in Specify 6.

Describe alternatives you've considered
There is no other option that is not time consuming. For instance, instead of typing 352000-26, users currently have to type 352000,352001,352002,352003,352004,352005,352006,352007,352008,352009,352010,352011,352012,352013,352014,352015,352016,352017,352018,352019,352020,352021,352022,352023,352024,352025,352026.

You can string together multiple OR operators with between queries, but it is rather slow and cumbersome.

Reported By
KU Herpetology, as this is the major reason they are still using Specify 6.

Metadata

Metadata

Assignees

Labels

2 - QueriesIssues that are related to the query builder or queries in generalSeparationFrom6

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions