Projectdepended Configuration

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
polzin
Posts: 4
Joined: 03 Mar 2005, 12:45

Projectdepended Configuration

Post by polzin »

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
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

This is part of what is being implemented with moving the configuration to the database (see #4416). The example screens shown there are done on a per project basis.
polzin
Posts: 4
Joined: 03 Mar 2005, 12:45

Post by polzin »

@thraxisp

If I got it right... Not quite. I have to configure the names of the statuses and the available priorities. This can´t be done by this database configuration, right?

Tobias
Last edited by polzin on 04 Mar 2005, 16:33, edited 1 time in total.
polzin
Posts: 4
Joined: 03 Mar 2005, 12:45

What I did...

Post by polzin »

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
polzin
Posts: 4
Joined: 03 Mar 2005, 12:45

Change of "current project" could be interesting..

Post by polzin »

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]
Post Reply