On Wed, May 17, 2023 at 9:34 AM Patty Cottrill <pcottr...@imci.net> wrote:
>
> I need help figuring out why my TracQuery is failing with the following error:
> Trac detected an internal error:
> OperationalError: ambiguous column name: id
>
> This is only occurring when I use a custom field in the query.
> I have two custom fields:
>
> referring_to
>
> No problem using this field in TracQuery
>
> Hostname
>
> Problem using this field in TracQuery
>
>
> These are my steps:
>
> Click on New Custom Query
> Select filters
> Select columns
>
> E.g. Summary, Status, Component, Created, Hostname, Referring to
>
> Click on Update
> The report displays with all the data selected, including the column for 
> Hostname
> Click on Save query
>
> This is when I get the error reported and I am not able to save query
> If I remove col=hostname, I can save successfully
>
>
>
> This is the query that is created when I click on Save query:
>
> query:?owner=pcottrill
> &
> col=id
> &
> col=summary
> &
> col=status
> &
> col=component
> &
> col=time
> &
> col=hostname
> &
> col=referring_to
> &
> order=priority
>
> Below is the environment:
>
> Trac  1.2.3
> Genshi 0.7 (with speedups)
> mod_python 3.3.1
> Pygments 2.1
> pysqlite 2.7.0
> Python 2.7.12
> setuptools 20.7.0
> SQLite 3.11.0
> jQuery 1.11.3
> jQuery UI 1.11.4
> jQuery Timepicker 1.5.5
> Apache2 2.4.18
>
>
> I am able to successfully create SQL queries using both custom fields with 
> the LEFT JOIN statement, but I should also be able to use TracQuery.
> Can you please help me figure out why this particular custom field is causing 
> this error with TracQuery.
> Again, the query itself works, but I am not able to save it for later use, so 
> I have to create a new one every time.
>
>
> Best,
> Patty Cottrill

That has been fixed in Trac 1.2.4 [1].
Please upgrade to Trac 1.2.6 (at least 1.2.4).

[1] https://trac.edgewall.org/ticket/13068

-- 
Jun Omae <jun6...@gmail.com> (大前 潤)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMag0DaOkWfG7%2BkUyLS5dsvRAO7r1Tt538D2cP%2B4%2BByEnow%40mail.gmail.com.

Reply via email to