On Monday 19 February 2007, Christian Boos wrote:
> 
> Hello Manuzhai,
> 
> Manuzhai wrote:

> > The second is r4786 [3], which fixes issue #1925 [4]. 
> > ...
> > In r4786, cboos fixed the ticket by making his own version of my
> > patch. Instead of changing the navcontributor in the reports module to
> > check for, then link to, the default_report option value, he chose to
> > have a default -1 value for the option, then make /report/-1 link to
> > the list (instead of /report, as before) and make /report link to the
> > default report.
> 
> I thought it was nicer to have ''View Tickets'' stay as /report and have 
> that linking to the default report.
> It's true that sometimes we get a list of resources when pointing to the 
> "realm" (e.g. milestone/ -> the list of milestones, aka. the roadmap), 
> but sometimes we also get the default resource for it (e.g. wiki/ -> the 
> WikiStart page).

I think in this case, "View Tickets" should point to the default, and /report 
should stay as a list of available reports.  Reasons in the next section.

> >  I think this is a bad idea for two reasons: (a) -1 is
> > kind of an ugly magic value that suddenly does something different,
> > which should not be exposed to the URL interface (and preferably not
> > to .ini file either, I'd prefer having something None-like or just
> > leaving the default_report option out if it's not wanted). The other
> > reason (b) is that this changes links to the report list and the
> > default report from before:
> >
> > http://trac.xavamedia.nl/nts/report becomes
> > http://trac.xavamedia.nl/nts/report/-1
> > http://trac.xavamedia.nl/nts/report/1 becomes
> > http://trac.xavamedia.nl/nts/report
> >
> > (Provided 1 is the default_report.)
> >   
> 
> The problem I see with specifying the default report number in the path 
> is that you can't really "export" a link to the default report, as the 
> way you did it, you have to give the report number in the URL.
> Perhaps by using a /report/default link one could achieve both goals?

Something else to think about here: making the query module the default while 
keeping the report module enabled.  If you make 'view tickets' point to the 
default report explicitly, it's a simple step from there to make it also 
allow the default to point to the query module.

Examples:
default_report = report  (The default value)
default_report = report/4
default_report = query
default_report = query?status=new&status=reopened

I think that approach would be more flexible, wouldn't introduce the "-1" 
magic, and wouldn't change urls.  (Further, if someone wrote a completely 
different report module as a plugin, they could set that as the default 
with "default_report = advancedquery" or the like.)
Yes, this could be "abused" with an entry like "default_report = 
wiki/CommonQueries", but maybe that would be useful too, come to think of 
it...

Thoughts?

Eli

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to