Repository version filters are confusing
I was working with kersom who was having trouble with the repo version filters.
First, there's a
content filter of type 'string' but there's no description or indication of what it expects. Recommend adding a description. Also, is there a type we can use like 'href' or something?
version_max. First off, there's no version field on repo version. It's actually called 'number'. Secondly, there's no indication in the api schema whether version_min=1 will include repo version 1 or not. We could maybe just use 'gt', 'gte', 'lt', 'lte' like django-filters.
edit: The we should remove the "version_min" and "version_max" filters and expose the number field to filter on directly, e.g. "number__lte"
#2 Updated by firstname.lastname@example.org about 2 years ago
- Triaged changed from No to Yes
Since "version" is not really a field, we should not include that. "number" works, but may be unnecessary. I think we should use max and min (+1)
That looks pretty clear to me. If we do gte/lte, it requires us to name the field. (+0)
#3 Updated by dalley about 2 years ago
I would actually prefer to rename the field for reasons laid out here:
I'm not entirely comfortable with "max" and "min" because there are enough fields on a RepositoryVersion that it isn't immediately clear which one they would correspond to. And "number" doesn't even have any help text at the moment.
I'm also not against it, it is nice and short (+0 I guess), I would just favor consistency over minor convenience.
#4 Updated by email@example.com about 2 years ago
I like the user experience of renaming "number" to "version" for this filter, but it just seems weird elsewhere.
To me, "RepositoryVersion.version" is awkward "RepositoryVersion.number" makes sense. Rename to "version" -0
I'm convinced that we can use "*__gte" for the field. As it is, "number__gte" seems fine. +1
Please register to edit this issue