Re: [Bug?] Filtering on property=-1 and ordering by the same property at the same time
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
On Sun, May 16, 2021 at 01:26:14PM -0400, John P. Rouillard wrote: > > In any > case I confirm that searching for -1 in link type fields (assignedto) > with sorting on the same field pretends that -1 is not > specified. Sorting by assignedto with filter: > > assignedto=-1,1,Admin1 > > behaves as though the filter was: > > assignedto=1,Admin1 Should be fixed now. > it's only the search using a negative pseudovalue along with some > other value that is problematic. Filter: > > assignedto=-1,-2 > > returns no results but I know there are issues without anybody > assigned. > > assignedto=1,-2 Although Link expressions *never* worked I've chosen to implement them. I think it's hard to explain to users why it works for Multilink but not Link properties. If you're interested see how I've fixed negation: An expression like "not (x = 1)" will find all cases where x has a value other than 1 but will *not* find cases where x is NULL in SQL :-) On Wed, May 12, 2021 at 07:37:31PM +0200, Nagy Gabor wrote: > > > Symptom: > > > > > > http://localhost:8080/tracker/issue?@filter=status&status=-1,2 > > > > > > lists all issues with status -1 (unset) or 2 (deferred). > > > > > > However, in the list of > > > > > > http://localhost:8080/tracker/issue?@filter=status&status=-1,2&@sort=status > > > > > > issues with status -1 are missing. This should be fixed, let us know if it now works for you. And thanks for the good example that allowed me to quickly come up with a test for this. Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]