Opened 2 years ago
Last modified 2 years ago
#6508 new feature request
Make Report 27 dynamic
Reported by: | desrosj | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Trac | Keywords: | |
Cc: |
Description
Today I discovered Report 27 (commit candidates by wranglers) on Trac.
This seems like an interesting report that could surface important tickets, or tickets that likely need less review. But the list of users is hard coded into the report query.
Would it be possible to dynamically include the Bug Gardener and Component Maintainer Group Members from the Trac admin? That would ensure this report is up to date without having to manually update the query all the time.
Also wondering how best to group this page. Not sure if by milestone, or by the trusted contributor that's matched, or something else.
Change History (3)
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
2 years ago
Replying to dd32:
I could see grouping by component being useful, owner, or even by last modified.
I like component. Let's roll with that! I tried to find a report grouping by component to copy the sequel but wasn't able to. Is there a public way to look this up for small changes in the future so I don't have to bother you?
I also copied over the color highlighting based on priority found in other reports, such as Report 6.
#3
in reply to:
↑ 2
@
2 years ago
Replying to desrosj:
I tried to find a report grouping by component to copy the sequel but wasn't able to.
Not really.. Trac is poorly documented IMHO. https://trac.edgewall.org/wiki/1.1/TracReports is the best you'll get.
It's just SQL though, so..
- Add
component as __group__,
to the SQL, save, view the report and realise it's not sorted by components (but is now visually grouped) - IMHO:__...__
fields should be at the start of theSELECT
for visibility, so after the__color__
field - Adjust the ordering to
ORDER BY component, ...
to ensure it's sorted appropriately.
I've just made those changes to confirm it works, but I've undone it so you can try it yourself @desrosj :)
So notably, whatever you return as the __group__
field is what will be the grouping shown, every time Trac see's that field change in the results it outputs a new heading. That means you need the results to be ordered like A, A, A, B, C, C
rather than A, B, C, C, A, A
.
At first my response here was
No - Trac reporting is SQL and has limited substitutions
.. however, it's SQL, and the User Groups are SQL..So I've replaced the horribly out-of-date static user list it was using to using this SQL:
AND t.owner IN ( SELECT DISTINCT username FROM permission WHERE action IN ( 'Committer', 'Bug Gardener', 'Component Maintainer' ) )
I could see grouping by component being useful, owner, or even by last modified.