Defect #71

Timelog entries remain after deleting an issue

Added by Balazs Dan almost 14 years ago. Updated over 13 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:



Deleting an issue does not delete related timelog entries. Thus you can see timelogs but dont know what was the issue!
Maybe it is a feature, because in real life spent time wont disappear after somebody deletes an issue, but in this case
issues shouldnt be removed permanently. But I think if somebody wants to delete an issue then he would like to delete
timelogs also.


timelogentries.JPG (27 KB) Balazs Dan, 2008-02-03 10:50

CantEditTimelogEntry.JPG (30.2 KB) Balazs Dan, 2008-02-03 10:50

Related issues

Duplicated by Redmine - Defect #734: time log of the removed issue remains in the project Closed 2008-02-25

Associated revisions

Revision 1182
Added by Jean-Philippe Lang over 13 years ago

Let the user choose when deleting issues with reported hours (closes #734, #71):
  • to delete the hours
  • to assign the hours to the project
  • to reassign the hours to another issue


#1 Updated by Derek Montgomery over 13 years ago

A status Deleted only available for requests and searches maybe?

#2 Updated by Balazs Dan almost 14 years ago

Great! Thanx.
I will do as you suggested. And I'm looking forward to your
implementation.. :)

#3 Updated by Jean-Philippe Lang almost 14 years ago

I fixed the last point you mentioned in rev 581 (:dependent =>
:nullify was missing on issue/time_entries association).

If you want the time entries to be removed with the issue, you
can replace :nullify by :delete_all in app/models/issue.rb on
line 30.

I'll try to implement solution 1, or maybe add an option
at application level to specify if time entries are removed with

#4 Updated by Balazs Dan almost 14 years ago


I understand your point and you are right. We cant undo the
spent time.
But if you remove an issue, then the timelog entries remain
and becuase of this you cant check what was the issue. And
this is confusing.

I can imagine 2 possible solutions:
1, When you delete an issue then the system will ask
you "Would you like to delete time entries also?"
2, When you delete an issue then it wont be deleted. The
system will flag its deleted state in a field. Normally
deleted issues wont be displayed in any report. Only in
time reports. (just because time entries remain...)

Please consider! If somebody deletes an issue then he does
it for a reason. And normally only managers can delete

One more thing:
If you delete an issue and you query timelogs for the
project then you can see every timelog. And you can edit
every entry. See attached timelogentries.jpg!
But when you try to edit it then the system will
say "<<issue>> is invalid". See

#5 Updated by Jean-Philippe Lang almost 14 years ago

As you said, it's not a bug. Even if you remove an issue, you
can not "un-spend" the time you have already spent
on it.
If you don't want to lose the information, just don't remove
the issue, close it.

#6 Updated by Jean-Philippe Lang over 13 years ago

  • Status changed from New to Closed

Applied in changeset r1182.

Also available in: Atom PDF