Force Project selection when entering Report

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
ribaaa
Posts: 2
Joined: 26 May 2014, 19:03

Force Project selection when entering Report

Post by ribaaa »

Hi,

I a fairly new to the Mantis but I hope that someone will be able to help me with my issue.
I would like that every time when new Report is issued it is mandatory to select project.
According to documentation it is not able to have project field in Report fields, but it is possible to force some other dialog (perhaps something similar to initial project selection for user)?

In my case I have users that are working on more projects at the same time, and with this I would like to force them to select appropriate Project when issuing report.

Thanks a lot
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Force Project selection when entering Report

Post by atrol »

There is no configuration option for it.
You could tell your users to set "All Projects" as default project in their account settings.
After that, they will be asked for the project when entering issues.
Please use Search before posting and read the Manual
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

Thanks for this, it solved my problem too!
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

I made my users protected so they could not change their settings.
Then I figured, I wanted to set "Project" to "All Projects".
Is there another way to set this by default without having them access My Account > Preferences to set Default Project = 'All Projects'?
Please help.

Thanks in advance!
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Force Project selection when entering Report

Post by atrol »

You could change the setting in database using mysql command prompt or phpMyAdmin.
I can't try at the moment, should be something like:

Code: Select all

update mantis_user_pref_table set default_project = 0;
Please use Search before posting and read the Manual
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

Thanks atrol, it is working now.
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

Additional favor please, still on My Account > Preferences...

Our current set-up for new and existing accounts has Time Zone defaulted to "Asia/Manila" and Language as "English".
But some users still has the access to this page and can change this value on their end.

I would like to have ALL our users in uniform time and language.
That is, Time Zone value is only "Asia/Manila" and Language is "English" with no other options available for them to select..
Please advise on how should I setup these fields.

Thanks in advance!
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

Any idea on this please? Your inputs is highly appreciated.
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Force Project selection when entering Report

Post by atrol »

Code: Select all

update mantis_user_pref_table set language = 'english';
update mantis_user_pref_table set timezone = 'Asia/Manila';
Please use Search before posting and read the Manual
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

Thanks again atrol!

However, what I really wanted is not just to set the default value for "language" and "timezone" but to limit its option only to the said values.
So in "language" field, 'english' is the default and is the only available value. The same case for language.
I was able to figure out "language" already by adjusting its equivalent function in config_inc.php to:
$g_languages_choices_arr = { English,};

But I am still left with timezone and if it's possible to implement the same.
Please help.
Attachments
Language = English
Language = English
2015-05-25_007.png (7.31 KiB) Viewed 13737 times
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Force Project selection when entering Report

Post by atrol »

There is no configuration option for the timezones.
We list just what PHP is delivering us http://php.net/manual/en/datetimezone.l ... ifiers.php

You would have to change function print_timezone_option_list in file core/print_api.php if you don't like this behavior.
Please use Search before posting and read the Manual
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Re: Force Project selection when entering Report

Post by MBT_novaa »

Understood. Well of course I like Mantis and all its functions... I just wanted to tailor it to our users.
Unfortunately, I'm not a programmer so I'm good and settled for timezone.

This is resolved, thanks atrol!
Post Reply