Modify

Opened 15 years ago

Closed 15 years ago

#4791 closed defect (fixed)

Hours get added twice (sometimes with different amount)

Reported by: pw@… Owned by: Jeff Hammel
Priority: highest Component: TracHoursPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Tried adding some hours at http://projects.opengeo.org/almanac/hours/387

On first attempt, I added 10.5 hours, with a description. On submit, my submission appeared twice (total hours 21). Interestingly, the two resulting entries had different descriptions: one just had my description, the other said "10.5 hours logged for slinkp:" followed by my description.

I tried again with 0 hours 15 minutes. This time my submission appeared twice, but one of them said 18 minutes instead of 15. Again the descriptions followed the same pattern.

Screenshot attached. This *should* show only two entries, one for 15 minutes and one for 10h30m.

Attachments (1)

hours_for_ticket_387_screenie.png (27.9 KB) - added by anonymous 15 years ago.
screenshot

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by anonymous

Priority: normalhighest

Changed 15 years ago by anonymous

screenshot

comment:2 Changed 15 years ago by Merola64

The reason for the extra addition seems to be that when adding hours, a comment is also added to the ticket itself, triggering the new feature that adds hours through ticket comments.

comment:3 Changed 15 years ago by anonymous

I've got the same problem. There is an extra addition always when I write a comment.

comment:4 in reply to:  2 Changed 15 years ago by Jeff Hammel

Replying to Merola64:

The reason for the extra addition seems to be that when adding hours, a comment is also added to the ticket itself, triggering the new feature that adds hours through ticket comments.

Yeah; this was originally worked around but then I had to add the hours via ITicketChangeListener instead of ITicketManipulator to get it to work with post-commit hooks, and this is what caused the issue

comment:5 Changed 15 years ago by Jeff Hammel

(In [5371]) use a tab to separate comments added through the /hours/<ticket number> view to avoid duplicate adding of hours, see #4791

comment:6 in reply to:  5 Changed 15 years ago by Jeff Hammel

Replying to k0s:

(In [5371]) use a tab to separate comments added through the /hours/<ticket number> view to avoid duplicate adding of hours, see #4791

This should mostly fix the issue; there is one remaining issue that references in the TTW comments to (e.g.) "3 hours worked" will cause duplicate hours, I think. fixing now

comment:7 Changed 15 years ago by Jeff Hammel

Resolution: fixed
Status: newclosed

(In [5373]) fix referencing hours in TTW /hours/<ticket> comments; fixes #4791

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jeff Hammel.
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.