View Issue Details

IDProjectCategoryView StatusLast Update
0002839mantisbtsqlpublic2003-12-13 04:41
ReporterreporterAssigned Tojfitzell  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86OSlinuxOS Versionredhat 7.3
Product Version0.17.5 
Summary0002839: Join incorrect in print_reporter_options and print_assign_to_option_list
Description

In file core_print_API.php.

the join on mantis_user_table, mantis_project_table and mantis_project_user_list_table is incomplete!!

It need also:

where p.id=l.project_id

The "DISTINCT" adjust all, but with a lot of project it's very slow!

in print_reporter_options:

$query = "SELECT DISTINCT u.id, u.username, u.email
FROM $g_mantis_user_table u,
$g_mantis_project_user_list_table l,
$g_mantis_project_table p
WHERE ((p.view_state='$t_pub' AND
u.access_level>='$t_rep') OR
(l.access_level>='$t_rep' AND
l.user_id=u.id) OR
u.access_level>='$t_adm')
AND p.id=l.project_id
ORDER BY u.username";

in print_assign_to_option_list:

$query = "SELECT DISTINCT u.id, u.username, u.email
FROM $g_mantis_user_table u,
$g_mantis_project_user_list_table l,
$g_mantis_project_table p
WHERE ((p.view_state='$t_pub' AND
u.access_level>='$t_dev') OR
(l.access_level>='$t_dev' AND
l.user_id=u.id) OR
u.access_level>='$t_adm')
AND p.id = l.project_id
ORDER BY u.username";

Bye,

Angelo Rossi, Turin, Italy
<a href="mailto:angelo.rossi@fiat.com" target="_new">angelo.rossi@fiat.com</a>
<a href="mailto:rossi@polithema.it" target="_new">rossi@polithema.it</a>

TagsNo tags attached.

Activities

jfitzell

jfitzell

2003-03-05 03:46

reporter   ~0003929

That query is awful anyway and needs to be replaced with some cached access level calls but I've applied the fix for the time being.