View Issue Details

IDProjectCategoryView StatusLast Update
0013341mantisbtbugtrackerpublic2014-09-23 18:05
ReporterCodeCutterAssigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.8 
Target Version1.2.9Fixed in Version1.2.9 
Summary0013341: Moving issues with no category (g_allow_no_category = ON)
Description

Attempting to move an issue with no category set (allowed via the g_allow_no_category configuration parameter) to another project generates a "APPLICATION ERROR 0001502" message.

The error is generated in the "category_get_row" function at line 295 in core/category_api.php see hash e679a1c02978ba1b811959dedc358598fc595458

Steps To Reproduce

Set g_allow_no_category = ON
Create an issue that doesn't have a category set
Attempt to move the issue created above to another project.

Additional Information

I would propose correcting the call to "category_get_field" in core/bug_api.php line 1059 in hash e679a1c

Correct to:

if( 0 != $t_category_id ) {
$t_category_project_id = category_get_field( $t_category_id, 'project_id' );
} else {
$t_category_project_id = ALL_PROJECTS;
}

or

if( 0 == $t_category_id ) {
return;
}

$t_category_project_id = ALL_PROJECTS;

depending on how you guys like to code things :)

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
related to 0013850 closeddregad Moving from project to project causes application error 1502 

Activities

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036302

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x ef3759c6

2011-10-03 05:44

dregad


Details Diff
Fixes moving of bugs without category

Prior to this, attempting to move an issue with no category set
(allowed with $g_allow_no_category = ON) to another project generated
error 1502.

Now, Mantis will successfully move the issue, and also set the category
to the default value if it is mandatory in the target project.

Fixes 0013341
Affected Issues
0013341
mod - core/bug_api.php Diff File

MantisBT: master 978b17ac

2011-10-03 05:44

dregad


Details Diff
Fixes moving of bugs without category

Prior to this, attempting to move an issue with no category set
(allowed with $g_allow_no_category = ON) to another project generated
error 1502.

Now, Mantis will successfully move the issue, and also set the category
to the default value if it is mandatory in the target project.

Fixes 0013341
Affected Issues
0013341
mod - core/bug_api.php Diff File