Relationship Graph
View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0005888 | mantisbt | bugtracker | public | 2005-07-07 09:25 | 2005-07-23 02:08 | ||||||
| Reporter | hgaland | Assigned To | thraxisp | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||||
| Status | closed | Resolution | fixed | ||||||||
| Product Version | 1.0.0a3 | ||||||||||
| Fixed in Version | 1.0.0rc1 | ||||||||||
| Summary | 0005888: error in user_get_accessible_projects | ||||||||||
| Description |
+--P3 and call user_get_accessible_projects for a user that have access_has_global_level private_project_threshold you get the wrong list of projects (P1, P2, P3 instead of all) | ||||||||||
| Additional Information | correction seems to be in user_api.php function user_get_accessible_projects( $p_user_id, $p_show_disabled = false ) {
/ | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | Modifications_graph_api.php.delta (4,405 bytes)
********
$t_user_id = auth_get_current_user_id();
if ( ALL_PROJECTS == $t_project_id ) {
# Only projects to which the user have access
342a343
> /* Bug in project list
$t_accessible_projects_array = user_get_accessible_projects( $t_user_id )
343a345,351
> */
> $t_topprojects = $t_accessible_projects_array = user_get_accessible_proje
> foreach ( $t_topprojects as $t_project ) {
> $t_accessible_projects_array = array_merge( $t_accessible_projects_array
> }
> $t_accessible_projects_array = array_unique( $t_accessible_projects_array
> # Bug in project list
$specific_where = ' AND (project_id='. implode( ' OR project_id=', $t_acc
} else {
$specific_where = " AND project_id='$t_project_id'";
********
if ( ALL_PROJECTS == $t_project_id ) {
# Only projects to which the user have access
376a385
> /* Bug in project list
$t_accessible_projects_array = user_get_accessible_projects( $t_user_id )
377a387,393
> */
> $t_topprojects = $t_accessible_projects_array = user_get_accessible_proje
> foreach ( $t_topprojects as $t_project ) {
> $t_accessible_projects_array = array_merge( $t_accessible_projects_array
> }
> $t_accessible_projects_array = array_unique( $t_accessible_projects_array
> # Bug in project list
$specific_where = ' AND (project_id='. implode( ' OR project_id=', $t_acc
} else {
$specific_where = " AND project_id='$t_project_id'";
********
if ( ALL_PROJECTS == $t_project_id ) {
# Only projects to which the user have access
427a444
> /* Bug in project list
$t_accessible_projects_array = user_get_accessible_projects( $t_user_id )
428a446,452
> */
> $t_topprojects = $t_accessible_projects_array = user_get_accessible_proje
> foreach ( $t_topprojects as $t_project ) {
> $t_accessible_projects_array = array_merge( $t_accessible_projects_array
> }
> $t_accessible_projects_array = array_unique( $t_accessible_projects_array
> # Bug in project list
$specific_where = ' AND (project_id='. implode( ' OR project_id=', $t_acc
} else {
$specific_where = " AND project_id='$t_project_id'";
********
if ( ALL_PROJECTS == $t_project_id ) {
# Only projects to which the user have access
496a521
> /* Bug in project list
$t_accessible_projects_array = user_get_accessible_projects( $t_user_id )
497a523,529
> */
> $t_topprojects = $t_accessible_projects_array = user_get_accessible_proje
> foreach ( $t_topprojects as $t_project ) {
> $t_accessible_projects_array = array_merge( $t_accessible_projects_array
> }
> $t_accessible_projects_array = array_unique( $t_accessible_projects_array
> # Bug in project list
$specific_where = ' AND (project_id='. implode( ' OR project_id=', $t_acc
} else {
$specific_where = " AND project_id='$t_project_id'";
********
if ( ALL_PROJECTS == $t_project_id ) {
# Only projects to which the user have access
551a584
> /* Bug in project list
$t_accessible_projects_array = user_get_accessible_projects( $t_user_id )
552a586,592
> */
> $t_topprojects = $t_accessible_projects_array = user_get_accessible_proje
> foreach ( $t_topprojects as $t_project ) {
> $t_accessible_projects_array = array_merge( $t_accessible_projects_array
> }
> $t_accessible_projects_array = array_unique( $t_accessible_projects_array
> # Bug in project list
$specific_where = ' (project_id='. implode( ' OR project_id=', $t_accessi
} else {
$specific_where = " project_id='$t_project_id'";
********
if ( ALL_PROJECTS == $t_project_id ) {
# Only projects to which the user have access
614a655
> /* Bug in project list
$t_accessible_projects_array = user_get_accessible_projects( $t_user_id )
615a657,663
> */
> $t_topprojects = $t_accessible_projects_array = user_get_accessible_proje
> foreach ( $t_topprojects as $t_project ) {
> $t_accessible_projects_array = array_merge( $t_accessible_projects_array
> }
> $t_accessible_projects_array = array_unique( $t_accessible_projects_array
> # Bug in project list
$specific_where = ' (project_id='. implode( ' OR project_id=', $t_accessi
} else {
$specific_where = " project_id='$t_project_id'";
| ||||||||||
|
I detected this problem while testing graphes. When on all_projects, the graph shows only data from the projects directly under the root project (ALL_PROJECTS) and not sub-projects. The proposed correction in additional notes does not work because it indeeds a side effect in the drop down box for project selection (sub projects are duplicated) Do you have another solution ????? |
|
|
The problem was in fact in the Graph_api which does not include all subprojects. Can you include the attached correction in standard release ??? Best regards |
|
|
This was fixed as part of the related issue. core/graph_api.php -> 1.31 |
|
related to
child of
duplicate of