MantisBT

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008357mantisbttime trackingpublic2007-09-13 12:192008-08-11 09:41
ReporterSergiodf 
Assigned Todaryn 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.1.0a4 
Target VersionFixed in Version1.2.0a2 
Summary0008357: "Total time for issue" is shown even for users under threshold
DescriptionFor a bug with time tracking data, in bug details page, at botom of "Notes" box a message is shown: "Total time for issue = ##:##" (this is OK).

But I have configured config_inc.php as follows:
    # --8<--------------------------------------
    $g_time_tracking_view_threshold = DEVELOPER;
    # --8<--------------------------------------
But if you set an user as "updater", the message is even shown for him.
Steps To Reproduce1. Enable time tracking with following parameters in config_inc.php:
    # --8<--------------------------------------
    $g_time_tracking_enabled = ON;
    $g_time_tracking_with_billing = ON;
    # Instead of a text field turning this option on places a stopwatch on the page with “Start/Stop” and “Reset” buttons next to it. You must have $g_use_javascript switched on for this to take effect. A bit gimickie, but who cares.
    $g_time_tracking_stopwatch = OFF;
    # Access level required to view time tracking information - Default DEVELOPER.
    $g_time_tracking_view_threshold = DEVELOPER;
    # Access level required to add/edit time tracking information - Default DEVELOPER.
    $g_time_tracking_edit_threshold = DEVELOPER;
    # Access level required to run reports (not completed yet) - Default MANAGER.
    # $g_time_tracking_reporting_threshold = MANAGER;
    # --8<--------------------------------------
2. Set up an user with a role under $g_time_tracking_view_threshold, for example: reporter.
3. Login as that user and go to a bug with time tracking information filled.
4. Scroll until end of "Notes" box, the message "Total time for issue: ##:##" appears for this user, who have a role under threshold.
TagsNo tags attached.
Attached Filesdiff file icon total_time_threshold.diff [^] (471 bytes) 2008-02-01 06:56 [Show Content]

- Relationships
parent of 0009183closedvboctor Port 0008357: "Total time for issue" is shown even for users under threshold 

-  Notes
User avatar (0015664)
gw_accnt (reporter)
2007-09-19 14:36

I think the bug is in bugnote_view_inc.php, ca. 20 lines from the end:

It is now
if ( $t_total_time > 0 ) {
 echo ..., sprintf ( lang_get( 'total_time_for_issue' ), db_minutes_to_hhmm( $t_total_time ) ), ...;

}


But schould be
if ( ( $t_total_time > 0 )
  && ( access_has_bug_level( config_get( 'time_tracking_view_threshold' ), $f_bug_id ) ) )
{
...
}


Can anybody verify this?
User avatar (0016906)
kynx (reporter)
2008-02-01 06:57

Yup, that looks right to me. Patch to fix (against 1.1.1) attached.
User avatar (0016926)
GregorK (reporter)
2008-02-03 05:04

Patch works great for me.
User avatar (0017640)
daryn (developer)
2008-04-21 11:03

Checked over patch. Looks good. Applied to trunk.

- Related Changesets
MantisBT: master 50704ec7
Timestamp: 2008-04-21 15:01:52
Author: daryn
Details ] Diff ]
Apply patch for bug 0008357 - "Total time for issue" is shown even for users under threshold

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5186 [^] /?p=mantisbt.git;a=object;h=f5dc347c-c33d-0410-90a0-b07cc1902cb9
mod - bugnote_view_inc.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2007-09-13 12:19 Sergiodf New Issue
2007-09-19 14:36 gw_accnt Note Added: 0015664
2008-02-01 06:56 kynx File Added: total_time_threshold.diff
2008-02-01 06:57 kynx Note Added: 0016906
2008-02-03 05:04 GregorK Note Added: 0016926
2008-04-21 09:56 daryn Status new => assigned
2008-04-21 09:56 daryn Assigned To => daryn
2008-04-21 11:03 daryn Status assigned => resolved
2008-04-21 11:03 daryn Fixed in Version => 1.2.0a2
2008-04-21 11:03 daryn Resolution open => fixed
2008-04-21 11:03 daryn Note Added: 0017640
2008-05-21 02:36 vboctor Issue cloned: 0009183
2008-05-21 02:36 vboctor Relationship added parent of 0009183
2008-08-11 09:41 giallu Status resolved => closed
2008-10-20 16:50 Changeset attached master a779d80d =>
2008-11-11 08:33 daryn Changeset attached master 50704ec7 =>
2008-11-11 08:46 daryn Changeset attached master 50704ec7 =>


MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.0877 seconds.
memory usage: 3,064 KB
Powered by Mantis Bugtracker