Re: [Bug?] Filtering on property=-1 and ordering by the same property at the same time

Nagy Gabor <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>


>On Wed, May 12, 2021 at 07:37:31PM +0200, Nagy Gabor wrote:
>> > Can you retry without sorting?
>> > As far as I know, for Link properties (like status) you cannot
>combine
>> > -1 with other IDs, so you can either search for -1 alone or for
>> > several IDs but not the combination. Should not make a difference
>if
>> > you're sorting on the same property or not.
>> > 
>> > Note that the same thing should (since some patches over the
>weekend
>> > :-) work reliably for multilink properties.
>> > 
>> > And, yes, it would be desirable to have the same mechanisms for
>Link
>> > and Multilink props ...
>> > 
>> > Ralf
>> 
>> Dear Ralf,
>> 
>> Thanks, but it seems that "filter=-1,2" etc. works as expected
>without
>> sorting, e.g. in my first example. It looks also OK if you sort by a
>> property different from status (the property that contains a -1
>> filter), e.g. "filter=status&status=-1,2&@sort=id"
>
>OK, that's a bug then. I've created issue2551135 and put you on the
>nosy
>list.
>
>> Do you say that a filter like status=-1,2 has unpredictable result?
>
>It shouldn't but I'm not sure this ever got the testing it deserves.
>I'm quite sure it *does* work for multilinks after my recent changes.

Dear Ralf,

Thank you for opening the bug.

I hope it works well, because I am going to use status=-1,2 -like filters in production. (I've added sort and filter capabilities to the table in issue's index view. And I use "select multiple" for setting filter on Link properties, too, including the option -1. Btw, I am using the method indexargs_form(), and I have many repetitions in my GET url: @filter=status&@filter=status&@filter=status... It does not seem to cause any trouble, it just look odd, and url might become too long.

>> Which patch do you refer to?
>
>See my commits between May 8 and May 10 involving the query generator
>for Multilink properties. But these were just for Multilink not Link
>properties and I'm not sure that filter for Link properties behaves
>correctly for all use-cases. (And I'm sure it doesn't support
>expressions like the Multilink search does).
>
>Ralf

OK, thanks, I will look into these patches. I agree with your previous mail, filters should bahave in the same way for links and multilinks (search expressions, etc.)

Regards,
Gábor


_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.