View Issue Details

IDProjectCategoryView StatusLast Update
0005823mantisbtperformancepublic2007-07-22 17:22
ReporterSjord Assigned To 
Status newResolutionopen 
Product Version1.0.0a3 
Summary0005823: user_get_accessible_(sub)projects has too much overhead

user_get_accessible_projects and user_get_accessible_subprojects are used for two things:
1) to select the projects to which a user has access (e.g. SELECT * WHERE project_id IN ( user_get_accessible_projects + user_get_accessible_subprojects ) )
2) to make a list of projects with subprojects.

For 1, the hierarchy is not needed at all. A new function get_accessible_projects could return both the projects and the subprojects to which the user has access. For 2, the name of the project is needed and it is already selected in u_ga(sub)projects.

Additional Information

This would save a query for each project (namely that for retreiving the name of the project) and it would save time when merely retreiving the projects a user has access to. I suggest using the function helper_project_specific_where to return a list or array with projects a user has access to. I suggest using user_get_accessible_projects to return an array or object which contains the structure of projects and subprojects, including their names.

I made a overview of the functions which have to be adapted for this. If you agree and I have enough time, I will do it.

TagsNo tags attached.


2005-06-20 16:50


functions.pdf (9,210 bytes)


2007-07-22 17:22

manager   ~0015162

sjord, thanks for your analysis. The attachment is lost. I was wondering if you can provide a patch with your suggested changes.

Issue History

Date Modified Username Field Change
2005-06-20 16:50 Sjord New Issue
2005-06-20 16:50 Sjord File Added: functions.pdf
2007-07-22 17:22 vboctor Note Added: 0015162