Modify

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#6046 closed defect (fixed)

Sometimes AddHours won't work to sum up total hours

Reported by: math@… Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords: addhours total sum
Cc: Trac Release: 0.11

Description

This bug seems to appear and disappear:

When trying to add hours to a ticket, total hours won't change, instead the "hours" field gets a new value. Either this is a bug or we aren't aware of something important here. I've attached a small screenshot which explains the situation in more detail.

LogLevel trac.log, loglevel was set to WARNING, at the moment I set it to DEBUG, to investigate any further.

  • TimingAndEstimationPlugin: 0.8.1
  • Trac: 0.11.4
  • Other plugins in use:
    • ForceComment 0.1, TracBib 0.1, TracMath 0.1, TracMercurial 0.11.0.8
  • System: OpenSuse 11.1, 32-bit, Apache 2.2.10, mod_python 3.3.1, python 2.6

Any help is very much appreciated and welcome.

Attachments (1)

trac-hacks-bug-report.png (72.1 KB) - added by math@… 15 years ago.
See what goes wrong, when trying to add new hours to total hours, only the hours filed changes.

Download all attachments as: .zip

Change History (12)

Changed 15 years ago by math@…

Attachment: trac-hacks-bug-report.png added

See what goes wrong, when trying to add new hours to total hours, only the hours filed changes.

comment:1 Changed 15 years ago by anonymous

By the way, if I click on "time reports" to view the progress on certain tickets in a given time period, all hours which are added (including those just seems to change the hours-field) are all summed correctly up to the correct, value, just the "total hours" in the ticket is wrong.

comment:2 Changed 15 years ago by Russ Tyndall

Hmmm... I haven't had any reports of this behavior before.

It almost looks like the ticket_daemon module was disabled for a while. Is that a possibility?

DEBUG level logging when you are experiencing the error will definitely be helpful.

You might also try upgrading to the newest version, which will probably not fix the bug, but might fix some others you are not experiencing (0.8.4 went up earlier).

As for your second comment, that is as I would expect (the reports are based on the hours change records and do not even look at total-hours).

Thanks for the bug report,

Russ

comment:3 Changed 15 years ago by anonymous

Ok, I updated our TiminAndEstimationPlugin to 0.8.4b (not sure if we should use with-permissions version or not, we chose with-permission) and switched our trac.log LogLevel to DEBUG.

BTW, how can I check if the ticket_daemon module is running?

However, this morning we encountered the strange behaviour once more:

2009-10-28 10:36:20,414 Trac[default_workflow] DEBUG: render_ticket_action_control: action "leave"
2009-10-28 10:36:20,415 Trac[default_workflow] DEBUG: render_ticket_action_control: action "unaccept"
2009-10-28 10:36:20,415 Trac[default_workflow] DEBUG: render_ticket_action_control: action "resolve"
2009-10-28 10:36:20,417 Trac[default_workflow] DEBUG: render_ticket_action_control: action "reassign"
2009-10-28 10:36:20,418 Trac[default_workflow] DEBUG: render_ticket_action_control: action "accept"
2009-10-28 10:36:20,420 Trac[ticket_policy] DEBUG: Internal: action:ATTACHMENT_CREATE, user:ebaum, resource:<Resource u'ticket:113, attachment'>, perm: <trac.perm.PermissionCache o
bject at 0xb8cbf0a4>
2009-10-28 10:36:20,421 Trac[ticket_policy] DEBUG: Internal: RESULTS for ATTACHMENT_CREATE: None
2009-10-28 10:36:20,422 Trac[ticket_policy] DEBUG: Internal: action:TICKET_APPEND, user:ebaum, resource:<Resource u'ticket:113'>, perm: <trac.perm.PermissionCache object at 0xb8c22
784>
2009-10-28 10:36:20,424 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_APPEND: None
2009-10-28 10:36:20,424 Trac[session] DEBUG: Retrieving session for ID u'ebaum'
2009-10-28 10:36:20,426 Trac[chrome] DEBUG: Prepare chrome data for request
2009-10-28 10:36:20,427 Trac[ticket_policy] DEBUG: Internal: action:TICKET_CREATE, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,428 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,428 Trac[ticket_policy] DEBUG: Internal: action:BROWSER_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,429 Trac[ticket_policy] DEBUG: Internal: action:TRAC_ADMIN, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,429 Trac[perm] DEBUG: No policy allowed ebaum performing TRAC_ADMIN on None
2009-10-28 10:36:20,429 Trac[ticket_policy] DEBUG: Internal: action:PERMISSION_GRANT, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,429 Trac[perm] DEBUG: No policy allowed ebaum performing PERMISSION_GRANT on None
2009-10-28 10:36:20,429 Trac[ticket_policy] DEBUG: Internal: action:PERMISSION_REVOKE, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,430 Trac[perm] DEBUG: No policy allowed ebaum performing PERMISSION_REVOKE on None
2009-10-28 10:36:20,430 Trac[ticket_policy] DEBUG: Internal: action:TICKET_ADMIN, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,430 Trac[perm] DEBUG: No policy allowed ebaum performing TICKET_ADMIN on None
2009-10-28 10:36:20,431 Trac[ticket_policy] DEBUG: Internal: action:TIMELINE_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,431 Trac[ticket_policy] DEBUG: Internal: action:ROADMAP_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,432 Trac[ticket_policy] DEBUG: Internal: action:WIKI_VIEW, user:ebaum, resource:<Resource 'wiki'>, perm: <trac.perm.PermissionCache object at 0xb8c225cc>
2009-10-28 10:36:20,433 Trac[ticket_policy] DEBUG: Internal: action:SEARCH_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,433 Trac[ticket_policy] DEBUG: Internal: action:REPORT_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,434 Trac[ticket_policy] DEBUG: Internal: action:TIME_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,434 Trac[perm] DEBUG: No policy allowed ebaum performing TIME_VIEW on None
2009-10-28 10:36:20,437 Trac[ticket_policy] DEBUG: Internal: action:EMAIL_VIEW, user:ebaum, resource:None, perm: <trac.perm.PermissionCache object at 0xb8cd202c>
2009-10-28 10:36:20,437 Trac[blackmagic] DEBUG: IN BlackMagic
2009-10-28 10:36:20,437 Trac[blackmagic] DEBUG: read enchants = []
2009-10-28 10:36:20,438 Trac[tande_filters] DEBUG: TicketFormatFilter executing
2009-10-28 10:36:20,438 Trac[tande_filters] DEBUG: TicketFormatFilter disabling totalhours and removing header hours
2009-10-28 10:36:20,438 Trac[tande_filters] DEBUG: Not a query returning
2009-10-28 10:36:20,438 Trac[ticket_webui] DEBUG: TicketWebUiAddon executing
2009-10-28 10:36:20,532 Trac[ticket_policy] DEBUG: Internal: action:TICKET_VIEW, user:ebaum, resource:<Resource u'ticket:132'>, perm: <trac.perm.PermissionCache object at 0xb8bc0bb
c>
2009-10-28 10:36:20,533 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_VIEW: None
2009-10-28 10:36:20,569 Trac[ticket_policy] DEBUG: Internal: action:TICKET_CHGPROP, user:ebaum, resource:<Resource u'ticket:113'>, perm: <trac.perm.PermissionCache object at 0xb8c2
29dc>
2009-10-28 10:36:20,572 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_CHGPROP: None
2009-10-28 10:36:20,573 Trac[ticket_policy] DEBUG: Internal: action:TICKET_EDIT_DESCRIPTION, user:ebaum, resource:<Resource u'ticket:113'>, perm: <trac.perm.PermissionCache object 
at 0xb8c9948c>
2009-10-28 10:36:20,576 Trac[ticket_policy] DEBUG: Internal: RESULTS for TICKET_EDIT_DESCRIPTION: None
2009-10-28 10:36:20,601 Trac[main] DEBUG: 925 unreachable objects found.

Hope this is any help.

comment:4 Changed 15 years ago by math@…

Oh, I forgot to mention: we all use Firefox from version 3.0 to 3.5. And the update process I did was simply remvoing the old TimingAndEstimationPlugin python egg from the plugins directory and installing the new egg via the web_admin UI, and restarted the Apache.

Mathias

comment:5 Changed 14 years ago by Russ Tyndall

The permissions branch is for use if you wish to prevent some class of users from modifying / viewing the time related data.

As best I can tell from the log, the ticket_daemon never even showed up, probably because there was a ticket policy in place preventing the user from modifying the field (or something).

What does the [field settings] of your trac.ini look like? Also what permissions does the user having the problem ("ebaum" it looks like) have assigned to him?

comment:6 Changed 14 years ago by anonymous

Our ticket-related trac.ini sections are as follows:

[ticket]
default_component = 
default_milestone = 
default_priority = major
default_resolution = fixed
default_type = defect
default_version = 
max_description_size = 262144
preserve_newlines = default
restrict_owner = false
workflow = ConfigurableTicketWorkflow

[ticket-custom]
billable = checkbox
billable.label = Billable?
billable.order = 3
billable.value = 1
estimatedhours = text
estimatedhours.label = Estimated Number of Hours
estimatedhours.order = 1
estimatedhours.value = 0
hours = text
hours.label = Add Hours to Ticket
hours.order = 2
hours.value = 0
internal = checkbox
internal.label = Internal?
internal.order = 5
internal.value = 0
platform = select
platform.label = Platform
platform.options = All|Linux|Windows|Mac OS X
totalhours = text
totalhours.label = Total Hours
totalhours.order = 4
totalhours.value = 0

[ticket-workflow]
accept = new,assigned,accepted,reopened -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY
leave = * -> *
leave.default = 1
leave.operations = leave_status
reassign = new,assigned,accepted,reopened -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY
reopen = closed -> reopened
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE
resolve = new,assigned,accepted,reopened -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY
unaccept = accepted -> new
unaccept.operations = del_owner
unaccept.permissions = TICKET_MODIFY

the permissions for "ebaum" are:

Trac [/srv/trac/Project]> permission list ebaum

User   Action                 
------------------------------
ebaum  BROWSER_VIEW           
ebaum  CHANGESET_VIEW         
ebaum  CONFIG_VIEW            
ebaum  EMAIL_VIEW             
ebaum  FILE_VIEW              
ebaum  LOG_VIEW               
ebaum  MILESTONE_CREATE       
ebaum  MILESTONE_DELETE       
ebaum  MILESTONE_MODIFY       
ebaum  MILESTONE_VIEW         
ebaum  REPORT_SQL_VIEW        
ebaum  REPORT_VIEW            
ebaum  ROADMAP_VIEW           
ebaum  SEARCH_VIEW            
ebaum  TICKET_APPEND          
ebaum  TICKET_CHGPROP         
ebaum  TICKET_CREATE          
ebaum  TICKET_EDIT_CC         
ebaum  TICKET_EDIT_DESCRIPTION
ebaum  TICKET_MODIFY          
ebaum  TICKET_VIEW            
ebaum  TIMELINE_VIEW          
ebaum  WIKI_CREATE            
ebaum  WIKI_DELETE            
ebaum  WIKI_MODIFY            
ebaum  WIKI_VIEW 

comment:7 Changed 14 years ago by math@…

BTW: "anonymous" has no permissions at all at this trac environment.

comment:8 Changed 14 years ago by Russ Tyndall

Ok, you have not setup any of the permissions branch configuration. You will either want to switch to the non permissions branch, or configure the plugin and then assign appropriate permissions to people.

HTH, let me know if you still need help

comment:9 Changed 14 years ago by math@…

Yes, I think this was the root of the problem: authenticated users have had no TIME_RECORD permission. Now they have, and additionally due to the permission-branch of this great plugin, I was able to hide billable, remove internal and disabled the estimation fileds.

Thanks a lot for this very good support and the work you've done so far, very great!

comment:10 Changed 14 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

Thanks, Russ

comment:11 Changed 14 years ago by Russ Tyndall

err... you're welcome

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.