View Issue Details

IDProjectCategoryView StatusLast Update
0014189mantisbtsub-projectspublic2012-09-05 11:19
Reporterpatgaytx Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.10 
Summary0014189: APPLICATION ERROR 0001502 Category not found.
Description

I'm getting this message after moving a bug from one subproject to another:
APPLICATION ERROR 0001502

Category not found.

The patch provided in 0013007 seems to be in place in bug_api.php.

Can someone tell me what's going on and how to fix it?

// Bug has no category
if( $t_category_id == 0 ) {
// Category is required in target project, set it to default
if( ON != config_get( 'allow_no_category', null, null, $p_target_proj
ect_id ) ) {
bug_set_field( $p_bug_id, 'category_id', config_get( 'default
_category_for_moves' ) );
}
}
// Check if the category is global, and if not attempt mapping it to the new
project
else {
$t_category_project_id = category_get_field( $t_category_id, 'project
_id' );

            if ( $t_category_project_id != ALL_PROJECTS
              && !project_hierarchy_inherit_parent( $p_target_project_id, $t_cate

gory_project_id )
) {

TagsNo tags attached.

Relationships

duplicate of 0013850 closeddregad Moving from project to project causes application error 1502 
related to 0014190 acknowledged When moving an issue, allow selection of both the Project and the Category 
related to 0012105 closeddregad Receiving APPLICATION ERROR 0001502 on view_all_bug_page.php 

Activities

patgaytx

patgaytx

2012-04-24 19:56

reporter   ~0031714

I wanted to add that the sub-project I'm trying to move the bug to does not have the same category name as the sub-project I'm moving from.

So the question now becomes, how to move a bug from one sub-project/category combination to another sub-project/category when the categories between sub-projects are different. My first inclination is to have the person moving the bug select both the "Move To" sub-project AND the "Move To" category.

patgaytx

patgaytx

2012-04-24 20:00

reporter   ~0031715

Another thing I noticed is that this problem only occurs when the General Category (id 1) doesn't exist. This is the case for me as I deleted all the general categories. I updated the database table mantis_category_table and inserted id 1 with a name of General and was able to get past the message when moving a bug. The SQL I used was: INSERT INTO mantis.mantis_category_table (id, project_id, user_id, name, status) VALUES ('1', '0', '0', 'General', '0');

I still maintain my comment in the prior note: 0014189:0031714
So the question now becomes, how to move a bug from one sub-project/category combination to another sub-project/category when the categories between sub-projects are different. My first inclination is to have the person moving the bug select both the "Move To" sub-project AND the "Move To" category.

atrol

atrol

2012-04-25 01:35

developer   ~0031716

You have to define $g_default_category_for_moves to some valid category. This can be done fot all projects in config_inc.php or per project on manage configuration page.

patgaytx

patgaytx

2012-04-25 01:56

reporter   ~0031717

yeah, that's how I ended up fixing the problem. I added back the general category with id 1 (effectively defining $g_default_category_for_moves).

I'd like to see an enhancement made that would give you the opportunity to select both the Project/subproject and the category when doing a move so that it doesn't require any preconfiguration in the config_inc.php or at the project level.

dregad

dregad

2012-04-25 05:53

developer   ~0031719

The original issue is a duplicate of 0013850, and atrol provided the correct fix for that. I will document this in the Admin guide / troubleshooting section.

Your feature request will be tracked separately in 0014190.

Related Changesets

MantisBT: master 21b7b34f

2012-04-24 23:02

dregad


Details Diff
Documentation: added error 1502 in Troubleshooting guide

Affects 0013850, 0014189 and several other issues (see related).
Affected Issues
0013850, 0014189
mod - docbook/Admin_Guide/en-US/Troubleshooting.xml Diff File

MantisBT: master-1.2.x 695040ce

2012-04-24 23:02

dregad


Details Diff
Documentation: added error 1502 in Troubleshooting guide

Affects 0013850, 0014189 and several other issues (see related).
Affected Issues
0013850, 0014189
mod - docbook/adminguide/en/troubleshooting.sgml Diff File

MantisBT: master 30df2f45

2012-05-01 21:10

dregad


Details Diff
Documentation: improved troubleshooting for error 1502

Added instructions on how to retrieve the category id
Affected Issues
0013850, 0014189
mod - docbook/Admin_Guide/en-US/Troubleshooting.xml Diff File

MantisBT: master-1.2.x 6e842296

2012-05-01 21:10

dregad


Details Diff
Documentation: improved troubleshooting for error 1502

Added instructions on how to retrieve the category id
Affected Issues
0013850, 0014189
mod - docbook/adminguide/en/troubleshooting.sgml Diff File