“If debugging is the process of removing bugs, then programming must be the process of putting them in.” – Edsger Dijkstra
This is the Bug Tracking System for the Flyspray project. This is not a demo! Before opening a new task, please read the guidelines!
Do not issue bugs reports against versions earlier than 0.9.9.6
Security problem? Check the security section.
FS#1604 - Project list elements
Attached to Project:
Flyspray - The bug killer!
Opened by René Jahn (rjahn) - Monday, 14 September 2009, 17:57 GMT+1
Opened by René Jahn (rjahn) - Monday, 14 September 2009, 17:57 GMT+1
|
DetailsA user has 1 project and the project list contains:
- All Projects Why is ‘All Projects’ in the list?
The user has to select the project but there is only one project in the list... |
This task depends upon
Sounds like this request is to do two things:
In regards to point 1, flyspray already keeps a project preference called "default_project" in the flyspray_prefs table. In order to set the default project, you need to go to the Administrator's Toolbox and select the Preferences section. On the General tab, the Default Project drop-down can be found. Set this value to your project. The associated code is in header.php and looks like this:
As for point 2, this could get a bit messy. It should be possible to hide "All Projects" from the drop down but if and only if the Default Project field is not set to "All Projects". For example, let's say we have a single project, called "My Project". Technically, "All Projects" and "My Project" have different settings associated with them. They have different "Look and Feel" settings, for example. In absence of a project_id, it would be incorrect to have Default Project set to "All Projects", but then show "My Project" by itself on the front-end on the drop-down. In that case, the layout is being derived from "All Projects", even though the front-end is claiming it's "My Project".
So, I'd modify this request to: "If there is only one project, and it's set as the Default Project, then hide project-changing options from the front-end". I think this will give you what you want but also minimize coding complexity. I believe you could make this change in templates/links.tpl to something like this:
I have not tested this so I could be completely wrong or perhaps there is a better way. If this works, it might make sense to hide the drop-down and "Switch" button completely if there is only one project and it's the default. Then Flyspray would just display "Overview, Tasklist, Add Task, etc" and it'd look cleaner for small installs. But I have no idea if that'd have any side-effects. It looks like that HTML form is exclusively used for project-switching.
I tried to change the code for myself to have a better discussion base!
ad 1.) I use the default project, but that's global and not per user!
My users have different projects and often not the default project assigned!
So, in most cases there is no default project selected. This can be fixed when you save the
default project per user!
ad 2.) If a user has only one project, then i hide the select box and the switch button. The assigned project will be selected.
You're right with the 'All Projects' configuration. I don't know the whole system as you do, so i missed some things...
We have the "same" solution, the only problem is the default project because if I unserstand you, it's also possible that there
are different settings for 'All Projects' when it's not the default project, because the user can switch to it, and then he has
the other settings!
....but...
when the All projects has a different LaF setting as an assigned project, it's no problem to hide All projects because the
project setting will be used or inherited from the default?
The setting difference should be no problem at all?
Please give me some hints if i am wrong or misunderstood.