View Issue Details

IDProjectCategoryView StatusLast Update
0008582mantisbtfeaturepublic2019-02-19 15:26
Reporterrbendig Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status assignedResolutionopen 
Summary0008582: Default Category for Project / Global default Category
Description

Hi,

our company has many projects in mantis. For all those projects we must have categories, so our customers need to select the "one and only" category by hand. It would be nice to see, that, if there is only one category, the category is selected by default.

This could be a global configuration , or a "per project" configuration "[categoryname] [assign to] [set default:yes;no]".

TagsNo tags attached.

Relationships

related to 0008435 closedjreese Implement Global and Inheriting Categories Structure 
has duplicate 0011921 closeddregad Autoselect category if only one exists 
has duplicate 0012711 closeddregad Re-add g_default_bug_category to make a default category per project 
has duplicate 0013568 closedatrol What Set Default Catecory FOR ALL users and projects ?? 
has duplicate 0013570 closedatrol What Set Default Catecory FOR ALL users and projects ?? Not WORk !! I NEED HELP !!! I'm angry 
has duplicate 0015349 closeddregad Auto Assign without a category? 
related to 0004102 closedvboctor Category field should be empty by default or default specified 

Activities

jreese

jreese

2007-11-15 08:18

reporter   ~0016216

This is planned for eventual inclusion as part of Bug 0008435.

dregad

dregad

2011-09-27 17:50

developer   ~0029876

See duplicate bug 0011921 for suggestions on how to address this issue

johnsilver182

johnsilver182

2011-11-29 03:17

reporter   ~0030355

What Set Default Catecory FOR ALL users and projects ?? Not WORk !! I NEED HELP !!! I'm angry

http://screenshot.su/show.php?img=e552dc22d425cbec8eda53dc872d1661.jpg

EPIC FAIL

http://screenshot.su/show.php?img=627e0a9a1a648222b7b26bbf82326ec6.jpg

watergad

watergad

2011-11-29 08:15

reporter   ~0030356

This is not a solution but only a suggestion how to implement such a feature.
For now there's no way to set default category and no option named 'categoryname'.
You may use tweak in 0011921 to implement something like this.

/

Указанное выше - не описание, как задать категорию по умолчанию, а предложение разработчикам, как можно реализовать такую фичу.
На данный момент, такой фичи нет. Указать категорию по умолчанию нельзя никак.

Если владеете PHP - можете воспользоваться твиком в 0011921, там выбирается первая категория из имеющихся. Можете подкрутить этот твик, чтобы он искал категорию с определенным наименованием и выбирал ее.

И, да, боюсь, здесь вряд ли кто-то волнуется, angry ли вы (:

johnsilver182

johnsilver182

2011-11-29 11:24

reporter   ~0030358

watergad - НАШИ В ГОРОДЕ !!

etfb

etfb

2013-01-03 03:14

reporter   ~0034682

This bug is only five days younger than my own young son, who is now five and a bit. Probably a good time to apply the simple fix in 0008582 and clear it off your plate, I think!

atrol

atrol

2013-01-03 04:05

developer   ~0034683

I see no need for categories if there is just one.
If I had this use case I would set $g_allow_no_category = ON;

etfb

etfb

2013-01-03 04:22

reporter   ~0034684

atrol: I hadn't noticed that option. That certainly solves it for me. So to put it in terms that someone who comes here looking for an answer would understand:

If you are not intending to use categories at all, you can add the following line to your config_inc.php file:

$g_allow_no_category = OFF;

This will save you needing to choose the default category every time.

However, I still support the addition of the code as follows, on the "belt, braces and two condoms" theory of software development.

File: core/print_api.php
Function: print_category_option_list
Line: 693 in current version, immediately before the line "foreach( $cat_arr as $t_category_row ) {"
Add:  if (count($cat_arr) == 1) $p_category_id = $cat_arr[0]['id'];

Either way, though, I would not object if this bug were marked closed with the above explanation. I think it's quite reasonable.

etfb

etfb

2013-01-03 04:27

reporter   ~0034686

Oh bother, typo. The correct line should be:

$g_allow_no_category = ON;

Confusing language makes for confused users.

dregad

dregad

2013-01-03 07:45

developer   ~0034687

I started working on this last year, but due to other priorities and lack of time it's been left on the side since then.

You're welcome to have a look at the corresponding code on my github branch [1], but bear in mind that it's probably not feature-complete and for sure not fully tested. In any case, feedback would be appreciated.

[1] https://github.com/dregad/mantisbt/tree/fix-8582-default-category

gsusin

gsusin

2013-03-25 17:32

reporter   ~0035963

I'd like to confirm if the code in github will solve my problem:

We don't use categories anywhere (this field is made hidden to the users through config), but need notifications be sent to each project's main developer every time a new bug is created. We have more than 20 projects, assigned to 5 main developers.

From the admin point of view, the simplest solution seems to have a new button named "Set as Default" besides each category (in the "Categories" box in project configuration screen). Then he just uses the current steps to assign a default developer for the default category.

sandyj

sandyj

2018-02-21 16:59

reporter   ~0058991

I think an option to set a default category per project would be useful in a number of situations:

  • a specific proj only has only one category but other projects have multiple categories. allow_no_category option doesn't help here as you may need to move issues to other projects.
  • A project has multiple categories but one is more widely used than the rest.
  • Allows for setting a category for email reporting per project
ChrisG

ChrisG

2019-02-19 15:26

reporter   ~0061523

Another angle to this...

If you're reporting a bug from a view that is filtered to only show one category, I suggest defaulting the new issue's category to that category.