Modify

#11092 closed defect (fixed)

Deleting hours when deleting a ticket

Reported by: j43l1us@… Owned by: rjollos
Priority: normal Component: TracHoursPlugin
Severity: major Keywords: deleting
Cc: Trac Release: 0.12

Description

Hi everybody,
I'm running TracHoursPlugin 0.6.0dev-r12205 on a TRAC 0.12.3 server and I noticed that the hours allocated to a ticket aren't deleted when I'm deleting this ticket...
Is there an update that fixes the problem ?

Thank you in advance for you answer, have a good day

Attachments (0)

Change History (9)

comment:1 follow-up: Changed 11 months ago by rjollos

  • Status changed from new to assigned

I haven't tried to reproduce yet, but I think it will be a fairly easy issue to solve. It looks like we just need to delete the hours in ITicketChangeListener.ticket_deleted. In fact, the body of that method reads # TODO: delete hours for this ticket.

comment:2 in reply to: ↑ 1 Changed 11 months ago by anonymous

Replying to rjollos:

I haven't tried to reproduce yet, but I think it will be a fairly easy issue to solve. It looks like we just need to delete the hours in ITicketChangeListener.ticket_deleted. In fact, the body of that method reads # TODO: delete hours for this ticket.

Thanks you for the answer ! I'll wait for that modification.
Have a nice day

comment:3 Changed 11 months ago by rjollos

(In [13199]) Refs #11092: Populate and destroy the database on each test run. Adjusted test cases to account for ticket-custom field having been created in setUp by the call to upgrade_environment.

comment:4 Changed 11 months ago by rjollos

(In [13206]) Refs #11092:

  • Implemented delete_ticket_hours.
  • Call delete_ticket_hours in ITicketChangeListener.ticket_deleted implementation.
  • Fixed error in test_add_ticket_hours. The id column of the database was being confused with ticket.id, however the ticket id value is stored in the ticket column.

Note: Plugin version is 0.6.0dev and API is subject to change before the 0.6.0 release.

comment:5 Changed 11 months ago by rjollos

(In [13207])

Refs #11092: Moved method _revert_trachours_schema_init to shared function revert_trachours_schema_init in __init__.py.

comment:6 follow-up: Changed 11 months ago by rjollos

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

The issue should be resolved now. Please let me know if you encounter any issues.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 11 months ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to rjollos:

The issue should be resolved now. Please let me know if you encounter any issues.

Thank you for resolving this sir ! Hours are deleted when I delete the ticket, works fine!

I tested your modifications by reinstalling the plugin :

easy_install https://trac-hacks.org/svn/trachoursplugin/trunk/

But, I've got another problem now : TicketSidebarProviderPlugin is not showing so I can't add hours to a ticket...

comment:8 in reply to: ↑ 7 ; follow-up: Changed 11 months ago by j43l1us@…

Sorry, bad formatting... Anonymous was me
Replying to j43l1us@gmail.com:

Replying to rjollos:

The issue should be resolved now. Please let me know if you encounter any issues.


Thank you for resolving this sir ! Hours are deleted when I delete the ticket, works fine !
I tested your modifications by reinstalling the plugin :

easy_install https://trac-hacks.org/svn/trachoursplugin/trunk/


But, I've got another problem now : TicketSidebarProviderPlugin is not showing so I can't add hours to a ticket...

comment:9 in reply to: ↑ 8 Changed 11 months ago by j43l1us@…

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

Replying to j43l1us@gmail.com:

Sorry, bad formatting... Anonymous was me
Replying to j43l1us@gmail.com:

Replying to rjollos:

The issue should be resolved now. Please let me know if you encounter any issues.


Thank you for resolving this sir ! Hours are deleted when I delete the ticket, works fine !
I tested your modifications by reinstalling the plugin :

easy_install https://trac-hacks.org/svn/trachoursplugin/trunk/


But, I've got another problem now : TicketSidebarProviderPlugin is not showing so I can't add hours to a ticket...

Damn, i'm a noob. My excuses... I tried to reinstall TicketSidebarProviderPlugin with easy_install... And the plugin is now visible !

Thanks a lot for your help sir !

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 rjollos. 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.