Hi,
I am looking for a possibility to have the configuration (e.g. status, some strings) depended of the currently selected project, because I have different projects where there is need for different statuses etc.
What I do currently is to have some
if ( auth_is_user_authenticated() ) {
$t_project_id = helper_get_current_project();
if ( $t_project_id == 5 ) {
...
} else if ( $t_project_id == 7 ) {
...
}}}
switches in custom_strings_inc.php.
a) this does not seem to be the right place :-), but in config_inc.php auth_is_user_authenticated is not available.
b) there are problems obviously when displaying "all projects", but also if I am "in" one project (the project displayed in the upper right corner) and then display an issue of a different project. (This can occur e.g. by searching for the issue id).
Any suggestions?
Tobias
Projectdepended Configuration
Moderators: Developer, Contributor
What I did...
As some parts (e.g. bug_change_page) need a change of configuration before custom_strings is called the first time, I had to split up the changes:
a) project depended string changes go into custom_strings
b) project depended config changes go into a config_project_inc.php that is required_once at the end of core.php
The original problem that e.g. after jumping to an issue that helper_get_current_project() may not return the correct project (it returns the selected project which is not necessary the project of the issue) remains.
Any hint for this???
Tobias
a) project depended string changes go into custom_strings
b) project depended config changes go into a config_project_inc.php that is required_once at the end of core.php
The original problem that e.g. after jumping to an issue that helper_get_current_project() may not return the correct project (it returns the selected project which is not necessary the project of the issue) remains.
Any hint for this???
Tobias
Change of "current project" could be interesting..
How do you currently treat the issue, that if a user jumps to a bug e.g. by entering the bug-number and pressing "JUMP", the project of the displayed bug and the "current project" do not necessarily match?
Wouldn´t it be also for your changes a good thing to automatically adjust the "current project"?
Tobias[/quote]
Wouldn´t it be also for your changes a good thing to automatically adjust the "current project"?
Tobias[/quote]