Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0003533mantisbtsqlpublic2004-02-29 07:16
ReporterNarcissus Assigned Toaarjona  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Summary0003533: Total bug count is sometimes incorrect when searching text
Description

If you do a search for some text, the resulting "Viewing Bugs" text is incorrect if that search text appears in more than one bug note attached to the same bug.

Additional Information

eg. on this tracker, search for all bugs reported by mbegan containing the word Herinnering . You will end up with the text "Viewing Bugs (1 - 1 / 2)". There's only one bug that matches it, but two of that bug's notes contain the word Herinnering.

This is because the functionality that counts the bugs actually counts the total bug IDs, but not DISTINCTly. Hence, when a bug ID has the text more than once, it is counted more than once.

I believe the following fixes this problem:
diff -r1.15 filter_api.php
171c171
< $query = "SELECT COUNT( $t_bug_table.id ) as count $t_from $t_join $t_where";

  $query = "SELECT COUNT( DISTINCT $t_bug_table.id ) as count $t_from $t_join $t_where";
TagsNo tags attached.

Relationships

duplicate of 0003569 closedaarjona Search results in wrong number of bugs 

Activities

aarjona

aarjona

2004-02-26 21:03

reporter   ~0005118

fixed