Mailing List Archive

next/previous ticket links after ticket query
Hello

I came across an issue regarding those "previous / next ticket" links in
the navigation menu on top of ticket pages. I am wondering about the
"correct" logic in scope of ticket queries.

Normally mathematically "next ticket" should yield the current ticket
number + 1. However, in scope of ticket queries "next" yields the next
ticket in scope of the query result, where for example the next ticket
after #45 may be #41. In scope of this query logic Trac even offers a
"Back to Query" link.
So far so good.

But how can I stop this query sort logic and return to the ordinary
mathematical logic?

How can I make TRAC forget the ticket query?

How can I have "next" mean "+1" again?

Reproduce as follows:
- make a query for all tickets
- sort descending by ticket number
- enter any ticket number in the search field (quick search)
- in the ticket you will see that "next" is inverted (because the
descending sorted query is still active)

What do you think?
Have I misunderstood something?

Thanks
Clemens

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/cbbb735e-5b18-edc2-29ed-9992090c31b5%40osypkamed.com.
Re: next/previous ticket links after ticket query [ In reply to ]
On Saturday, September 18, 2021 at 11:19:57 AM UTC-7 Clemens Feige wrote:

> Hello
>
> I came across an issue regarding those "previous / next ticket" links in
> the navigation menu on top of ticket pages. I am wondering about the
> "correct" logic in scope of ticket queries.
>
> Normally mathematically "next ticket" should yield the current ticket
> number + 1. However, in scope of ticket queries "next" yields the next
> ticket in scope of the query result, where for example the next ticket
> after #45 may be #41. In scope of this query logic Trac even offers a
> "Back to Query" link.
> So far so good.
>
> But how can I stop this query sort logic and return to the ordinary
> mathematical logic?
>
> How can I make TRAC forget the ticket query?
>
> How can I have "next" mean "+1" again?
>
> Reproduce as follows:
> - make a query for all tickets
> - sort descending by ticket number
> - enter any ticket number in the search field (quick search)
> - in the ticket you will see that "next" is inverted (because the
> descending sorted query is still active)
>
> What do you think?
> Have I misunderstood something?
>
> Thanks
> Clemens
>

Yeah, it appears that if a ticket is in the set of query results the
prev/next navigation will be within the context of those results. I suppose
you have to execute a new query to clear the context.

It's possible it might be better to only use the query context when the
referring page was /query or when navigating via the prev/next. I think the
query is stored in session data so it's probably fairly complicated with
browser tabs.

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/31fcc9fc-a5d1-4ed0-8064-e768b390fb63n%40googlegroups.com.
Re: Re: next/previous ticket links after ticket query [ In reply to ]
RjOllos wrote on 21.09.2021 at 22:41:
>
> On Saturday, September 18, 2021 at 11:19:57 AM UTC-7 Clemens wrote:
>
> Hello
>
> I came across an issue regarding those "previous / next ticket"
> links in
> the navigation menu on top of ticket pages. I am wondering about the
> "correct" logic in scope of ticket queries.
>
> Normally mathematically "next ticket" should yield the current ticket
> number + 1. However, in scope of ticket queries "next" yields the next
> ticket in scope of the query result, where for example the next ticket
> after #45 may be #41. In scope of this query logic Trac even offers a
> "Back to Query" link.
> So far so good.
>
> But how can I stop this query sort logic and return to the ordinary
> mathematical logic?
>
> How can I make TRAC forget the ticket query?
>
> How can I have "next" mean "+1" again?
>
> Reproduce as follows:
> - make a query for all tickets
> - sort descending by ticket number
> - enter any ticket number in the search field (quick search)
> - in the ticket you will see that "next" is inverted (because the
> descending sorted query is still active)
>
> What do you think?
> Have I misunderstood something?
>
> Thanks
> Clemens
>
>
> Yeah, it appears that if a ticket is in the set of query results the
> prev/next navigation will be within the context of those results. I
> suppose you have to execute a new query to clear the context.
>
> It's possible it might be better to only use the query context when the
> referring page was /query or when navigating via the prev/next. I think
> the query is stored in session data so it's probably fairly complicated
> with browser tabs.
>
> Ryan

Understood. So my thinking is correct. (Eventually I understood how
those prev/next buttons work.)

For me it is not a big problem, I can live with it. I understand, that
possible "solutions" are not that easy. People may simply have to
understand and learn that "prev/next" applies to the query result list
and not (only) to pure mathematical numbering. (Although this can take
years like in my case.)

One approach could be to extend the navigation menu in case a query is
active:

"Previous Ticket" (pure math -1)
"Previous in Query" (NEW! only if query is active)
"Back to Query" (only if query is active)
"Clear Query" (NEW! only if query is active)
"Next in Query" (NEW! only if query is active)
"Next Ticket" (pure math +1)

However, I am not sure if this is good usability. Smells like
overengineering.

A totally different approach is to clear the query as soon as somebody
enters a direct ticket number into the search field (i.e. quick jump).
In this case we may assume that the user is not interested in the query
context anymore.


Clemens

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/31467aa3-d7b4-071b-0dbf-c96297a08466%40osypkamed.com.
Re: Re: next/previous ticket links after ticket query [ In reply to ]
Am Mi., 22. Sept. 2021 um 10:43 Uhr schrieb Clemens Feige
<c.feige@osypkamed.com>:

> A totally different approach is to clear the query as soon as somebody
> enters a direct ticket number into the search field (i.e. quick jump).
> In this case we may assume that the user is not interested in the query
> context anymore.

In my experiments with Trac 1.2.6 it worked exactly this way: entering
a hash + ticket number into the search field made the "Back to query"
link vanish and the "Previous ticket"/"Next ticket" links point to
ticket number -1/+1, respectively.

- Thomas

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAGZbLYk6xY8LCvy4d0ZCT0g5R0Ee_%2BQj4DgdcYXS68%3DV5F7qpA%40mail.gmail.com.
Re: Re: next/previous ticket links after ticket query [ In reply to ]
Thomas Moschny wrote on 23.09.2021 at 09:19:
> Am Mi., 22. Sept. 2021 um 10:43 Uhr schrieb Clemens:
>
>> A totally different approach is to clear the query as soon as somebody
>> enters a direct ticket number into the search field (i.e. quick jump).
>> In this case we may assume that the user is not interested in the query
>> context anymore.
>
> In my experiments with Trac 1.2.6 it worked exactly this way: entering
> a hash + ticket number into the search field made the "Back to query"
> link vanish and the "Previous ticket"/"Next ticket" links point to
> ticket number -1/+1, respectively.
>
> - Thomas
>

Hello Thomas

No. We are running TRAC 1.4.3 but I also tested with TRAC 1.2.6 in the
Demo-Sandbox. The query context does NOT disappear when you enter a
quick jump into the search field. When making experiments, please make
sure to test with a ticket which is contained in the query result.

Example:

"All Tickets By Milestone"
https://trac.edgewall.org/demo-1.2/report/6?max=1000

Then enter #28 in the search field (i.e. quick jump). In ticket #28
clicking NEXT will bring you to #165.

Clemens

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a59444b8-616f-ee33-a488-6dc98d7a7eac%40osypkamed.com.
Re: Re: next/previous ticket links after ticket query [ In reply to ]
Am Do., 23. Sept. 2021 um 09:37 Uhr schrieb Clemens Feige
<c.feige@osypkamed.com>:
> The query context does NOT disappear when you enter a
> quick jump into the search field. When making experiments, please make
> sure to test with a ticket which is contained in the query result.

You are right, "Back to query" will reappear, together with changed
prev/next behavior when entering a ticket number that was in the
latest query. Not sure if this was originally intended as a
feature....

- Thomas

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAGZbLYmCkw5%2B6eA7E_9hf%3DpVoOk2Eqz31n7jwFw20x62QgtgzA%40mail.gmail.com.