Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11542 closed enhancement (wontfix)

Project list

Reported by: endquote Owned by: falkb
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Maybe this is in there somewhere already, but -- I would like the front page of my trac instance to include a list of projects that the current user has access to, linked to a report of open tickets for that project. Seems like this would be a great feature addition.

Attachments (0)

Change History (13)

comment:1 Changed 10 years ago by anonymous

Not sure if that's what you're thinking of, but how about the TicketQuery macro? E.g.:

[[TicketQuery(project=Foo1,status!=closed)]]
[[TicketQuery(project=Foo2,status!=closed)]]

See here for more details, like about displaying options.

comment:2 Changed 10 years ago by endquote

That's interesting, but not really what I'm thinking of... I think what I want is a macro like:

[ProjectList(href=/query?project=%project%)]

Which would output something like:

<ul>
    <li><a href="/query?project=Project1">Project1</a></li>
    <li><a href="/query?project=Project2">Project2</a></li>
    <li><a href="/query?project=Project3">Project3</a></li>
</ul>

Of course I could create this list manually without too much trouble, but it would be nice to have it automatically update when a project is added or closed.

comment:3 Changed 10 years ago by anonymous

This gets you a bit closer: [[TicketQuery(group=project,format=progress)]]

comment:4 Changed 10 years ago by endquote

That is pretty cool, but would still require me to add a new TicketQuery for each project when the project is added. I guess what I'm really looking for is a way to loop through projects.

[ProjectList(orderby=name,closed=false)]
[[TicketQuery(group=project,format=progress)]]
[/ProjectList]

Or:

<ul>
[ProjectList(orderby=name,closed=false)]
<li><a href="/query?project=[%project.name%]">[%project.name%]</a>: [%project.description%]</li>
[/ProjectList]
</ul>

I know the wiki syntax is all wrong on that, but that's the general idea.

No big deal though, it's not as if I'm adding projects so often.

comment:5 Changed 10 years ago by endquote

Something like this could work too:

[[TicketQuery(group=project,format=progress)]]

However this gives me an error...

comment:6 Changed 10 years ago by falkb

Hmm... I noticed the parameter group cannot have a value which is a custom ticket field. group=project doesn't work but it works with e.g. group=milestone. Seems like a restriction of the TicketQuery macro.

How about this one?

[[TicketQuery(group=milestone,project=~Project&status!=closed, format=progress)]]

It lists all milestones of projects containing the pattern 'Project' as progress bars which is also 'Project1', 'Project2' and 'Project3'.

Generally, I'd rather try to find a solution with TicketQuery. You know bloating a plugin too much is the beginning of its death.

comment:7 in reply to:  6 Changed 10 years ago by falkb

Replying to falkb:

[[TicketQuery(group=milestone,project=~Project&status!=closed, format=progress)]]

I wished I could set a parameter for showing only milestones with a set date.

comment:8 Changed 10 years ago by endquote

Should we log a ticket against TicketQuery to support grouping by custom fields? Guess I'll just do it manually in the meantime.

comment:9 Changed 10 years ago by endquote

Maybe this could do it: SqlQueryMacro

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

comment:10 Changed 10 years ago by endquote

I was able to get WikiTableMacro to work ok. It's not exactly what I want (the roadmap view grouped by project would be super cool), but this'll do for now. Proper support within TicketQuery would be best.

SQLTable
    SELECT '[/query?status=accepted&status=assigned&status=new&status=reopened&project=' || name || ' ' || name || ' — ' || summary || ']' as Projects FROM smp_project
Last edited 10 years ago by endquote (previous) (diff)

comment:11 in reply to:  10 Changed 10 years ago by falkb

Resolution: wontfix
Status: newclosed

Replying to endquote:

I was able to get WikiTableMacro to work ok. It's not exactly what I want (the roadmap view grouped by project would be super cool), but this'll do for now. Proper support within TicketQuery would be best.

Don't hesitate to file a bug report or enhancement ticket, respectively.

SQLTable
    SELECT '[/query?status=accepted&status=assigned&status=new&status=reopened&project=' || name || ' ' || name || ' — ' || summary || ']' as Projects FROM smp_project

Cool solution. Glad you've found something useful. Maybe it's a good idea to filter by project completion state also (column 'closed' in smp_project).

The ticket query suggestion from comment:6 doesn't fit your needs, does it? Here, we live from milestone to milestone (or version to version) anyway. So that would be useful here.

After all IMHO it's definitely up to the query system outside this plugin to feature the things reported here.

comment:12 Changed 10 years ago by endquote

I logged an enhancement request at trac: http://trac.edgewall.org/ticket/11479

Thanks for the ideas!

comment:13 Changed 10 years ago by endquote

My current solution here works pretty well...

#! SQLTable
    SELECT '[/query?status=accepted&status=assigned&status=new&status=reopened&project=' || name || ' ' || name || ' — ' || summary || ']' as Projects FROM smp_project WHERE closed = 0 ORDER BY name

...however it shows all projects to all users. Is there a good way to show only the projects the user has access to?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain falkb.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.