Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0006549mantisbtbugtrackerpublic2007-10-04 01:40
Reportertotalweb Assigned Togiallu  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.0.0rc4 
Summary0006549: Summary displays "longest open issue" from wrong project
Description

When opening the summary screen, mantis also displays the longest open issue. When a user does not have access to the project containing this longest open issue it still sees the bug (which after clicking the link sais access denied).

So if project A contains the longest open issue, then the summary pages of all projects display the issue from project A.

In this way a user can see the title of an issue that should be blocked from its view.

TagsNo tags attached.

Relationships

duplicate of 0008024 closedgiallu Summary Page - Longest open Issue 

Activities

ssexton

ssexton

2006-01-17 17:23

reporter   ~0011953

I noticed this today too. In my setup, it is very annoying, since my clients only have access to their projects and shouldn't even be aware of other projects.

Also, the issue isn't just the "longest open issue" field. Its all of the "Time Stats For Resolved Issues" fields - Longest Open, Average Time, and Total Time are also affected. I added a brand new project today and it is showing bogus time stats - although "Total Time" of 1471.73 for a 1-day old project is amusing, its not helpful.

I was expecting that these fields would reflect the currently selected project like the rest of the stats on the summary page.

scorpfromhell

scorpfromhell

2006-01-18 07:59

reporter   ~0011957

Same here, it came to my notice when my manager asked why is there such a long open issue in my project, on seeing the summary report.

imr_operations

imr_operations

2006-06-27 09:41

reporter   ~0013038

Hi there,

we've also noticed that problem in a similar situation as scorpfromhell. Really uncomfortable :(

As a quick fix (without further testing if it effects anything other) i changed the SQL statement (starting on line 54 in current version) in the summary_page.php to look as follows:

$query = "SELECT b.id, b.date_submitted, b.last_updated, MAX(h.date_modified) as hist_update, b.status
FROM $t_bug_table b LEFT JOIN $t_history_table h
ON b.id = h.bug_id AND h.type=0 AND h.field_name='status' AND h.new_value='$t_resolved'
WHERE b.status >='$t_resolved'
AND project_id=$t_project_id
GROUP BY b.id, b.status, b.date_submitted, b.last_updated
ORDER BY b.id ASC";

That seems to solve the issue. Hasn't noticed any negative side effect yet.

Greets
Patrick Schönfeld
in medias res Gesellschaft für Kommunikationstechnologien mbH

imr_operations

imr_operations

2006-06-27 09:47

reporter   ~0013039

Also i wanted to notice that i don't think that this value is useful at all. It does say nothing and if you have any bug that has been opened real long (until it got decided that it will never get fixed, because it is senseless or something) you don't have a chance to see a proper value in here.

ssexton

ssexton

2006-07-12 11:05

reporter   ~0013091

imr's patch doesn't work when you select "All Projects" or when you select a parent project. It only works when you select a single project that has no sub-project.

There seems to be a partial fix in the 1.0.3 version. The variable "$specific_where" contains the correct SQL to use, but its never used. This SQL statement gets it to work in all cases (the change is "AND $specific_where" instead of "AND project_id=$t_project_id"):

$query = "SELECT b.id, b.date_submitted, b.last_updated, MAX(h.date_modified) as hist_update, b.status 
    FROM $t_bug_table b LEFT JOIN $t_history_table h 
        ON b.id = h.bug_id  AND h.type=0 AND h.field_name='status' AND h.new_value='$t_resolved'  
        WHERE b.status >='$t_resolved' 
        AND $specific_where
        GROUP BY b.id, b.status, b.date_submitted, b.last_updated 
        ORDER BY b.id ASC";

Personally I find these metrics to be very useful, although as imr observed they can become meaningless if you end up with an abandoned bug in there. But if you keep an eye on the stat you can use it to help prevent getting abandoned bugs in the first place.

pmcconaghy

pmcconaghy

2007-01-15 00:43

reporter   ~0013921

See duplicate entries for this in 0007498, 0007374, 0007022, 0006632 (list of other related entries here!) and 0006223 (which contains a fix that worked for me!)

exk72

exk72

2007-01-15 02:36

reporter   ~0013922

this code from ssexton's note is in 1.1.0a2.