Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Update reports

30 views
Skip to first unread message

Roger Oberholtzer

unread,
Jan 28, 2025, 4:56:09 AMJan 28
to trac-...@googlegroups.com
My Trac has some reports that I would like to update how they are
done. As an example, report 1 (Active tickets) is implemented as:


SELECT p.value AS __color__,
id AS ticket, summary, milestone, t.type AS type,
owner, status,
time AS created,
changetime AS _changetime, t.description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE status <> 'closed'
ORDER BY CAST(p.value AS int), milestone, t.type, time

I would like to change report 1 so Active Tickets are selected in the
newer way where you can select filters, columns, etc from the GUI.

I want to keep the report number the same. So how could I do this
change? I am guessing these are defined in the trac database. Is there
a how-to on doing this change? I surely do not want to muck up the
database!

--
Roger Oberholtzer

Clemens Feige

unread,
Jan 28, 2025, 8:20:38 AMJan 28
to trac-...@googlegroups.com
Hello Roger

I am not sure if you question is about the report number or the report
query.

Generally you can simply edit i.e. update an existing report using the
"edit" field of the report in the TRAC web interface. This will not
change the report number. Not even if you change the report style from
SQL query to "TracQuery" expression.

In the GUI you cannot change the report number for existing reports. In
the GUI you only chance is to delete all reports and start from scratch
with number {1}.
Otherwise you would need to manipulate the database. I have done this.
The reports are in the "report" table of course and "id" is the report
number which one can manipulate.

Below is an example report which shows all open tickets. TracQuery
syntax is used for this report, instead of SQL.

query:?status=accepted & status=assigned & status=new & status=reopened
& max=1000 & col=id & col=summary & col=status & col=owner & col=type &
col=priority & col=milestone & col=component & col=version &
col=resolution & col=time & col=changetime & col=reporter & order=id

Clemens

Roger Oberholtzer

unread,
Jan 28, 2025, 11:15:15 AMJan 28
to trac-...@googlegroups.com
My question is mainly how to change the report from being specified as
a database query that you edit as text in Trac, to a database query
that is defined by selecting items in the TRAC report GUI. I would
like to start with, say, report 1, and change it from one to the
other, with the result being pretty much the same query.

Perhaps deleting all the current reports and adding them fresh is
possible, and perhaps better. Maybe it's time to clean up the defined
reports. Users will just have to use links to a different report
number. I was trying to avoid that.
> --
> 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+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/trac-users/45c22f9a-9843-4f3b-9b28-f057822f087b%40osypkamed.com.



--
Roger Oberholtzer
Reply all
Reply to author
Forward
0 new messages