Modify

Opened 5 years ago

Closed 5 years ago

#4791 closed defect (fixed)

Hours get added twice (sometimes with different amount)

Reported by: pw@… Owned by: 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 (1)

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by anonymous

  • Priority changed from normal to highest

Changed 5 years ago by anonymous

screenshot

comment:2 follow-up: Changed 5 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 5 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 5 years ago 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

comment:5 follow-up: Changed 5 years ago 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

comment:6 in reply to: ↑ 5 Changed 5 years ago 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

comment:7 Changed 5 years ago by k0s

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from k0s. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.