View Issue Details

IDProjectCategoryView StatusLast Update
0020362mantisbtapi soappublic2015-12-07 23:49
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Product Version1.2.19 
Summary0020362: mc_user_pref_get_pref() doesn't handle the case where project id doesn't exist
Description

Inside MantisBT codebase we support a project_id in the user preferences table, enabling users to have a different preferences per project. However, we seem to not use such feature of the database schema and store the preferences with project id = ALL_PROJECTS.

However, the SOAP API enables clients to pass in a project id. But once this project id is not 0 (ALL_PROJECTS), the row won't be found and a MantisBT error will be triggered.

We should ignore the incoming project_id for now and use ALL_PROJECTS within the API. Or we should check for the row with the specified user id, preference, and project_id and if not found, fallback to user id, preference, and ALL_PROJECTS. The former should do the trick until we start using this project_id field.

TagsNo tags attached.

Activities

There are no notes attached to this issue.