default category in 1.2

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mrd
Posts: 3
Joined: 27 Apr 2010, 08:41

default category in 1.2

Post by mrd »

Hello,

how can i define a default category for my projects? In version 1.1.2 it worked with g_default_bug_category but in 1.2 this option is gone and defined as obsolete? I cant find a solution. Can anyone help me please?

Thanks a lot

mrd
atrol
Site Admin
Posts: 8555
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: default category in 1.2

Post by atrol »

Maybe this is what you need:
You can have no category by settting $g_allow_no_category = ON; in config_inc.php
Please use Search before posting and read the Manual
mrd
Posts: 3
Joined: 27 Apr 2010, 08:41

Re: default category in 1.2

Post by mrd »

atrol wrote:Maybe this is what you need:
You can have no category by settting $g_allow_no_category = ON; in config_inc.php
No sorry, this option marked the categoryfield only as not required.
atrol
Site Admin
Posts: 8555
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: default category in 1.2

Post by atrol »

mrd wrote: No sorry, this option marked the categoryfield only as not required.
I am aware of that.
I thought that you might use the default category for nothing more than some convenience for reporters.
At first sight I see no big difference between having a NULL category and a default category.
It says nothing more than: The reporter has not done any categorisation.
Maybe the default category is OK, maybe the default category is nonsense because the reporter was just to lazy to select the right one.

Can you give me an example where a default category makes sense?

I don't know who made the decision to remove $g_default_bug_category and why.
If you want have it back you should enter a new issue for it.
Please use Search before posting and read the Manual
mrd
Posts: 3
Joined: 27 Apr 2010, 08:41

Re: default category in 1.2

Post by mrd »

atrol wrote: Can you give me an example where a default category makes sense?

I don't know who made the decision to remove $g_default_bug_category and why.
If you want have it back you should enter a new issue for it.
In my case we need the default to predefine the most used category. E.g a general category. When i disable the required category option then nobody fill out the category. So i will hardcode it directly in the script. :?

anyway thanks for your help

mrd
atrol
Site Admin
Posts: 8555
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: default category in 1.2

Post by atrol »

mrd wrote:When i disable the required category option then nobody fill out the category
But giving the users the general category as default is even worse in my opinion.
It just looks like they filled out the category, but in reality most of them didn't because they are not forced.
Please use Search before posting and read the Manual
Tk421
Posts: 7
Joined: 06 Oct 2010, 18:22

Re: default category in 1.2

Post by Tk421 »

I've made it changing the file bug_report_page.php. At line 108 ( in my 1.2.4 version) it says this:

Code: Select all

$f_category_id                  = gpc_get_int( 'category_id', 0 );
You can change de default category by changing that "0", the second parameter, and writting the id of the categrory that you want as default (id 1 in my case)

Also, i think you can define a config option called "default_bug_category_id" with the default value and change that line in the way of teh reproducibility, severity or priority:

Code: Select all

$f_category_id              = gpc_get_int( 'reproducibility', config_get( 'default_bug_category_id' ) );
The last option is only an idea, i've made it changing the value manually.
Post Reply