Ticket #4791 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Hours get added twice (sometimes with different amount)

Reported by: pw@openplans.org Assigned to: k0s
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

hours_for_ticket_387_screenie.png (27.9 kB) - added by anonymous on 03/16/09 16:59:41.
screenshot

Change History

03/16/09 16:58:26 changed by anonymous

  • priority changed from normal to highest.

03/16/09 16:59:41 changed by anonymous

  • attachment hours_for_ticket_387_screenie.png added.

screenshot

(follow-up: ↓ 4 ) 03/18/09 00:01:24 changed 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.

03/19/09 12:45:26 changed by anonymous

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

(in reply to: ↑ 2 ) 03/19/09 21:15:38 changed by k0s

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

(follow-up: ↓ 6 ) 03/19/09 21:17:06 changed by k0s

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

(in reply to: ↑ 5 ) 03/19/09 21:18:51 changed by k0s

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

03/19/09 21:46:33 changed by k0s

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4791 (Hours get added twice (sometimes with different amount))




Change Properties
Action