View Issue Details

IDProjectCategoryView StatusLast Update
0021912mantisbttaggingpublic2016-11-27 00:45
ReportercproensaAssigned Tocproensa 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3.3 
Target Version1.3.4Fixed in Version1.3.4 
Summary0021912: Related tags are not showed correctly

"Related tags" in tag_view_page.php, is not showed consistently
This is reproducible in non-mysql databases, due to the query being incorrectly built.

This is the wrong query built in pgsql:

SELECT * FROM mantis_bug_tag_table
WHERE tag_id != $4 AND bug_id IN ( SELECT FROM mantis_bug_table b
LEFT JOIN mantis_project_user_list_table p
        ON p.project_id=b.project_id AND p.user_id=$1 JOIN mantis_user_table u
        ON$2 JOIN mantis_bug_tag_table t
WHERE ( p.access_level>b.view_state OR u.access_level>b.view_state )
        AND t.tag_id=$3 )

with the parameters passed as:
( $p_tag_id, $c_user_id, $c_user_id, $p_tag_id )

TagsNo tags attached.

Related Changesets

MantisBT: master-1.3.x 28291bb8

2016-11-13 15:24:22


Committer: dregad Details Diff
Fix the position of parameters in query

The creation of parameters while building a query must happen in the
same order that they appear in the final sql string, and the order in
the array passed to db_query().

Fixes: 0021912
mod - core/tag_api.php Diff File

Issue History

Date Modified Username Field Change
2016-11-13 15:41 cproensa New Issue
2016-11-13 17:09 cproensa Assigned To => cproensa
2016-11-13 17:09 cproensa Status new => assigned
2016-11-13 17:09 cproensa Note Added: 0054516
2016-11-21 07:11 dregad Changeset attached => MantisBT master-1.3.x 28291bb8
2016-11-21 07:11 dregad Assigned To cproensa => dregad
2016-11-21 07:11 dregad Status assigned => resolved
2016-11-21 07:11 dregad Resolution open => fixed
2016-11-21 07:11 dregad Fixed in Version => 1.3.4
2016-11-21 08:24 dregad Assigned To dregad => cproensa
2016-11-21 08:24 dregad Target Version => 1.3.4
2016-11-27 00:45 vboctor Status resolved => closed