View Issue Details

IDProjectCategoryView StatusLast Update
0007468mantisbtbugtrackerpublic2007-05-08 03:43
Reporterachumakov Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0a1 
Fixed in Version1.1.0a3 
Summary0007468: Mantis displays one bug 10 times in My View 'monitored by me' list
Description

Mantis at http://www.mantisbugtracker.com/bugs/ fills Monitored by Me with only bug I monitor: 4286.

Additional Information

See attach

TagsNo tags attached.
Attached Files
mantisbug.gif (168,648 bytes)   
mantisbug.gif (168,648 bytes)   

Relationships

has duplicate 0007427 closedvboctor Same issue several times in list 
has duplicate 0007792 closedryandesign Same issue displayed multiple times in Monitored by Me 
has duplicate 0007416 closedvboctor 'Monitored by Me (1 - 10 / 3)' 
has duplicate 0007736 closedvboctor Multiple appearance of monitored issues in bug base 
has duplicate 0007593 closedvboctor my_view_page.php shows duplicate entries in 'Monitored by Me' 
related to 0007445 closedgiallu the "Monitored by Me " and "Viewing Issues" reports wrong issues no. 

Activities

seiji

seiji

2006-10-20 09:54

reporter   ~0013629

Last edited: 2006-10-20 09:57

filter_api.php, add following after 771L

$t_join ='';

"$t_join" is used in $query and $query3, but it isn't initialized after $query is executed.

alanshea

alanshea

2006-11-16 11:22

reporter   ~0013730

related/duplicate issues: 0007427, 0007416

vboctor

vboctor

2007-03-09 22:46

manager   ~0014161

seiji, can you provide more information about the location, e.g. function name, provide an extract from the code, since the lines have shifted since then. I also have a feeling that this is fixed in the latest code.

seiji

seiji

2007-03-10 01:15

reporter   ~0014162

Last edited: 2007-03-10 01:16

Hi,
954L in filter_api.php (1.147 CVS)
replace
for ( $i=0; $i < count( $t_sort_fields ); $i++ ) {
with
$t_join = '';
for ( $i=0; $i < count( $t_sort_fields ); $i++ ) {

sample of query2(989L)

before:
query2 = SELECT mantis_bug_table.* FROM mantis_bug_table LEFT JOIN mantis_bug_monitor_table user_monitor ON user_monitor.bug_id = mantis_bug_table.id WHERE mantis_bug_table.id in (7) ORDER BY last_updated DESC, date_submitted DESC

after:
SELECT mantis_bug_table.* FROM mantis_bug_table WHERE mantis_bug_table.id in (7) ORDER BY last_updated DESC, date_submitted DESC

it works for me.

giallu

giallu

2007-03-10 04:22

reporter   ~0014163

I just added myself on the monitor list of this bug and I can confirm the problem is still there.

I can now see 8 instances of this bug in the "Monitored by me" pane.

It does not seem casual there are exactly 8 users monitoring this bug...

I'm going to produce a patch based on seiji indications

giallu

giallu

2007-03-10 05:12

reporter   ~0014164

It seems this regression was introduced in revision 1.144 of filter_api.php, supposedly fixing 0007324; relevant diff:

@@ -875,7 +875,7 @@
$t_order = " ORDER BY " . implode( ', ', $t_order_array );
$t_select = implode( ', ', array_unique( $t_select_clauses ) );

  • $query2 = "SELECT DISTINCT $t_select
  • $query2 = "SELECT $t_select
    $t_from
    $t_join
    $t_where
giallu

giallu

2007-03-10 05:30

reporter   ~0014165

So. It seems the problem in 0007324 was actaully a MySQL bug, and it was fixed in 5.0.25 and 4.1.22.

I reverted the change (added DISTINCT clause) and the "Monitored by me" list is now correct, while 0007324 is not back (Fedora 6 has MySQL 5.0.27)

If needed, I can provide the (trivial) patch